diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-03-02 02:00:41 +0100 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-03-08 21:38:37 +0000 |
commit | be9df8bfa22cf5a7164f4f3deba44cdbd2b8e7cf (patch) | |
tree | f4a9153a9613f375f3a7dc15fb274a528a1269ed /searchcorespi/src | |
parent | 72e9888bcccbc384d2485409ba055633131ed512 (diff) |
Implement a default destructor to avoid the automatic inlining of large destructors.
Diffstat (limited to 'searchcorespi/src')
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp | 30 | ||||
-rw-r--r-- | searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h | 34 |
2 files changed, 44 insertions, 20 deletions
diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp index 7659a428fa3..5d16b0ba331 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.cpp @@ -92,6 +92,7 @@ public: : _caller(std::move(closure)), _index(index) { } + ~DiskIndexWithDestructorClosure(); const IDiskIndex &getWrapped() const { return *_index; } /** @@ -129,6 +130,8 @@ public: }; +DiskIndexWithDestructorClosure::~DiskIndexWithDestructorClosure() {} + } // namespace uint32_t @@ -409,6 +412,33 @@ IndexMaintainer::createNewSourceCollection(const LockGuard &newSearchLock) return ISearchableIndexCollection::UP(new IndexCollection(_selector, *currentLeaf)); } +IndexMaintainer::FlushArgs::FlushArgs() + : old_index(), + old_absolute_id(0), + old_source_list(), + save_info(), + flush_serial_num(), + stats(NULL), + _skippedEmptyLast(false), + _extraIndexes(), + _changeGens(), + _wtSchema() +{ +} +IndexMaintainer::FlushArgs::~FlushArgs() { } +IndexMaintainer::FlushArgs::FlushArgs(FlushArgs &&) = default; +IndexMaintainer::FlushArgs & IndexMaintainer::FlushArgs::operator=(FlushArgs &&) = default; + +IndexMaintainer::WipeHistoryArgs::WipeHistoryArgs() + : _old_source_list(), + _new_source_list() +{ } + +IndexMaintainer::WipeHistoryArgs::WipeHistoryArgs(WipeHistoryArgs &&) = default; +IndexMaintainer::WipeHistoryArgs & IndexMaintainer::WipeHistoryArgs::operator=(WipeHistoryArgs &&) = default; + +IndexMaintainer::WipeHistoryArgs::~WipeHistoryArgs() { } + bool IndexMaintainer::doneInitFlush(FlushArgs *args, IMemoryIndex::SP *new_index) { diff --git a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h index c7e0a304db6..dbab3e40028 100644 --- a/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h +++ b/searchcorespi/src/vespa/searchcorespi/index/indexmaintainer.h @@ -211,19 +211,12 @@ class IndexMaintainer : public IIndexManager, ChangeGens _changeGens; Schema::SP _wtSchema; - FlushArgs(void) - : old_index(), - old_absolute_id(0), - old_source_list(), - save_info(), - flush_serial_num(), - stats(NULL), - _skippedEmptyLast(false), - _extraIndexes(), - _changeGens(), - _wtSchema() - { - } + FlushArgs(); + FlushArgs(const FlushArgs &) = delete; + FlushArgs & operator=(const FlushArgs &) = delete; + FlushArgs(FlushArgs &&); + FlushArgs & operator=(FlushArgs &&); + ~FlushArgs(); }; bool doneInitFlush(FlushArgs *args, IMemoryIndex::SP *new_index); @@ -288,17 +281,18 @@ class IndexMaintainer : public IIndexManager, ISearchableIndexCollection::SP _old_source_list; ISearchableIndexCollection::SP _new_source_list; - WipeHistoryArgs() - : _old_source_list(), - _new_source_list() - { } + WipeHistoryArgs(); + WipeHistoryArgs(WipeHistoryArgs &&); + WipeHistoryArgs & operator=(WipeHistoryArgs &&); + + ~WipeHistoryArgs(); }; bool doneWipeHistory(WipeHistoryArgs &args); Schema getSchema(void) const; - Schema::SP getActiveFusionWipeTimeSchema(void) const; - search::TuneFileAttributes getAttrTune(void); - ChangeGens getChangeGens(void); + Schema::SP getActiveFusionWipeTimeSchema() const; + search::TuneFileAttributes getAttrTune(); + ChangeGens getChangeGens(); /* * Schedule document db executor task to use reconfigurer to |