diff options
author | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-11-02 12:46:11 +0000 |
---|---|---|
committer | Tor Egge <Tor.Egge@yahoo-inc.com> | 2016-11-03 11:32:28 +0000 |
commit | c19ca31b961511a5ddf3261658ba83dfc8c1e1ad (patch) | |
tree | 22c5290c8e5cde44338e0665da01f4b4ecbff1ae /searchcore/src/tests/proton/reprocessing | |
parent | 872727070b589f776b7a24d5a33581dc8114ae31 (diff) |
Flush attribute to memory first if attribute saver has a
read guard and we are using a spinning disk. This reduces
the time the read guard is held (and corresponding extra
long term memory usage due to large hold lists) at the cost
of a temporary memory usage spike while flushing attribute.
Diffstat (limited to 'searchcore/src/tests/proton/reprocessing')
-rw-r--r-- | searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp index 4670719897a..ebd5107f0a5 100644 --- a/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp +++ b/searchcore/src/tests/proton/reprocessing/attribute_reprocessing_initializer/attribute_reprocessing_initializer_test.cpp @@ -13,6 +13,7 @@ LOG_SETUP("attribute_reprocessing_initializer_test"); #include <vespa/searchlib/index/dummyfileheadercontext.h> #include <vespa/vespalib/test/insertion_operators.h> #include <vespa/vespalib/testkit/testapp.h> +#include <vespa/vespalib/util/mock_hw_info.h> #include <vespa/searchlib/common/foregroundtaskexecutor.h> using namespace proton; @@ -52,15 +53,17 @@ struct MyConfig { DummyFileHeaderContext _fileHeaderContext; ForegroundTaskExecutor _attributeFieldWriter; + std::shared_ptr<vespalib::IHwInfo> _hwInfo; AttributeManager::SP _mgr; search::index::Schema _schema; MyDocTypeInspector::SP _inspector; MyConfig() : _fileHeaderContext(), _attributeFieldWriter(), + _hwInfo(std::make_shared<vespalib::MockHwInfo>()), _mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(), _fileHeaderContext, - _attributeFieldWriter)), + _attributeFieldWriter, _hwInfo)), _schema(), _inspector(new MyDocTypeInspector()) { @@ -94,6 +97,7 @@ struct Fixture test::DirectoryHandler _dirHandler; DummyFileHeaderContext _fileHeaderContext; ForegroundTaskExecutor _attributeFieldWriter; + std::shared_ptr<vespalib::IHwInfo> _hwInfo; AttributeManager::SP _mgr; MyConfig _oldCfg; MyConfig _newCfg; @@ -103,9 +107,10 @@ struct Fixture : _dirHandler(TEST_DIR), _fileHeaderContext(), _attributeFieldWriter(), + _hwInfo(std::make_shared<vespalib::MockHwInfo>()), _mgr(new AttributeManager(TEST_DIR, "test.subdb", TuneFileAttributes(), _fileHeaderContext, - _attributeFieldWriter)), + _attributeFieldWriter, _hwInfo)), _initializer(), _handler() { |