diff options
author | Geir Storli <geirst@yahoo-inc.com> | 2017-04-21 11:48:16 +0000 |
---|---|---|
committer | Geir Storli <geirst@yahoo-inc.com> | 2017-04-21 11:48:16 +0000 |
commit | 10e61c3d4cceae6c3c97c9362463c41c44e0dda9 (patch) | |
tree | b03d6b24878a3c40a82ad273e10d1db3f55db5a2 /searchcore/src | |
parent | 7b6ca3c1e2fa23d72a820add54f6ce4d4ac8a882 (diff) |
Consolidate naming of variables in struct DocumentDBConfig::ComparisonResult.
Diffstat (limited to 'searchcore/src')
6 files changed, 39 insertions, 34 deletions
diff --git a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp index 0cd11a9f9c4..f926e53c041 100644 --- a/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp +++ b/searchcore/src/tests/proton/documentdb/configurer/configurer_test.cpp @@ -506,7 +506,7 @@ TEST_F("require that we can reconfigure attribute manager", Fixture) ViewPtrs o = f._views.getViewPtrs(); ConfigComparisonResult cmpres; cmpres.attributesChanged = true; - cmpres._schemaChanged = true; + cmpres.schemaChanged = true; AttributeCollectionSpec::AttributeList specList; AttributeCollectionSpec spec(specList, 1, 0); ReconfigParams params(cmpres); @@ -540,7 +540,7 @@ TEST_F("require that reconfigure returns reprocessing initializer when changing { ConfigComparisonResult cmpres; cmpres.attributesChanged = true; - cmpres._schemaChanged = true; + cmpres.schemaChanged = true; AttributeCollectionSpec::AttributeList specList; AttributeCollectionSpec spec(specList, 1, 0); ReconfigParams params(cmpres); @@ -635,7 +635,7 @@ TEST_F("require that we can reconfigure matchers", Fixture) TEST("require that attribute manager should change when imported fields has changed") { DocumentDBConfig::ComparisonResult result; - result._importedFieldsChanged = true; + result.importedFieldsChanged = true; ReconfigParams params(result); EXPECT_TRUE(params.shouldAttributeManagerChange()); } diff --git a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp index ea201dfd251..abfd80c9582 100644 --- a/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp +++ b/searchcore/src/tests/proton/documentdb/document_subdbs/document_subdbs_test.cpp @@ -349,8 +349,8 @@ struct FixtureBase MyConfigSnapshot::UP newCfg(new MyConfigSnapshot(reconfigSchema, reconfigConfigDir)); DocumentDBConfig::ComparisonResult cmpResult; cmpResult.attributesChanged = true; - cmpResult._documenttypesChanged = true; - cmpResult._documentTypeRepoChanged = true; + cmpResult.documenttypesChanged = true; + cmpResult.documentTypeRepoChanged = true; MyDocumentDBReferenceResolver resolver; IReprocessingTask::List tasks = _subDb.applyConfig(*newCfg->_cfg, diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp index dc1379ee316..0cfe065e728 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.cpp @@ -31,12 +31,12 @@ DocumentDBConfig::ComparisonResult::ComparisonResult() summaryChanged(false), summarymapChanged(false), juniperrcChanged(false), - _documenttypesChanged(false), - _documentTypeRepoChanged(false), - _importedFieldsChanged(false), - _tuneFileDocumentDBChanged(false), - _schemaChanged(false), - _maintenanceChanged(false) + documenttypesChanged(false), + documentTypeRepoChanged(false), + importedFieldsChanged(false), + tuneFileDocumentDBChanged(false), + schemaChanged(false), + maintenanceChanged(false) { } DocumentDBConfig::DocumentDBConfig( @@ -151,18 +151,18 @@ DocumentDBConfig::compare(const DocumentDBConfig &rhs) const !equals<SummarymapConfig>(_summarymap.get(), rhs._summarymap.get()); retval.juniperrcChanged = !equals<JuniperrcConfig>(_juniperrc.get(), rhs._juniperrc.get()); - retval._documenttypesChanged = + retval.documenttypesChanged = !equals<DocumenttypesConfig>(_documenttypes.get(), rhs._documenttypes.get()); - retval._documentTypeRepoChanged = _repo.get() != rhs._repo.get(); - retval._importedFieldsChanged = + retval.documentTypeRepoChanged = _repo.get() != rhs._repo.get(); + retval.importedFieldsChanged = !equals<ImportedFieldsConfig >(_importedFields.get(), rhs._importedFields.get()); - retval._tuneFileDocumentDBChanged = + retval.tuneFileDocumentDBChanged = !equals<TuneFileDocumentDB>(_tuneFileDocumentDB.get(), rhs._tuneFileDocumentDB.get()); - retval._schemaChanged = + retval.schemaChanged = !equals<Schema>(_schema.get(), rhs._schema.get()); - retval._maintenanceChanged = + retval.maintenanceChanged = !equals<DocumentDBMaintenanceConfig>(_maintenance.get(), rhs._maintenance.get()); return retval; diff --git a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h index b581655330d..cea49ba327f 100644 --- a/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h +++ b/searchcore/src/vespa/searchcore/proton/server/documentdbconfig.h @@ -44,12 +44,12 @@ public: bool summaryChanged; bool summarymapChanged; bool juniperrcChanged; - bool _documenttypesChanged; - bool _documentTypeRepoChanged; - bool _importedFieldsChanged; - bool _tuneFileDocumentDBChanged; - bool _schemaChanged; - bool _maintenanceChanged; + bool documenttypesChanged; + bool documentTypeRepoChanged; + bool importedFieldsChanged; + bool tuneFileDocumentDBChanged; + bool schemaChanged; + bool maintenanceChanged; ComparisonResult(); }; diff --git a/searchcore/src/vespa/searchcore/proton/server/reconfig_params.cpp b/searchcore/src/vespa/searchcore/proton/server/reconfig_params.cpp index 34709a7764d..d803aa5d738 100644 --- a/searchcore/src/vespa/searchcore/proton/server/reconfig_params.cpp +++ b/searchcore/src/vespa/searchcore/proton/server/reconfig_params.cpp @@ -16,7 +16,7 @@ ReconfigParams(const DocumentDBConfig::ComparisonResult &res) bool ReconfigParams::shouldSchemaChange() const { - return _res._schemaChanged; + return _res.schemaChanged; } bool @@ -34,7 +34,7 @@ ReconfigParams::shouldIndexManagerChange() const bool ReconfigParams::shouldAttributeManagerChange() const { - return _res.attributesChanged || _res._importedFieldsChanged; + return _res.attributesChanged || _res.importedFieldsChanged; } bool @@ -43,4 +43,12 @@ ReconfigParams::shouldSummaryManagerChange() const return _res.summaryChanged || _res.summarymapChanged || _res.juniperrcChanged; } +bool +ReconfigParams::shouldSubDbsChange() const +{ + return shouldMatchersChange() + || shouldAttributeManagerChange() + || shouldSummaryManagerChange(); +} + } // namespace proton diff --git a/searchcore/src/vespa/searchcore/proton/server/reconfig_params.h b/searchcore/src/vespa/searchcore/proton/server/reconfig_params.h index 0a9f73cfd26..f9fe87e7076 100644 --- a/searchcore/src/vespa/searchcore/proton/server/reconfig_params.h +++ b/searchcore/src/vespa/searchcore/proton/server/reconfig_params.h @@ -6,8 +6,10 @@ namespace proton { -class ReconfigParams -{ +/** + * Class specifying which components that should change after a reconfig. + */ +class ReconfigParams { private: const DocumentDBConfig::ComparisonResult _res; @@ -18,12 +20,7 @@ public: bool shouldIndexManagerChange() const; bool shouldAttributeManagerChange() const; bool shouldSummaryManagerChange() const; - bool shouldSubDbsChange() const { - return shouldMatchersChange() - || shouldAttributeManagerChange() - || shouldSummaryManagerChange(); - } + bool shouldSubDbsChange() const; }; -} // namespace proton - +} |