diff options
author | Geir Storli <geirst@yahooinc.com> | 2023-02-07 16:03:06 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-07 16:03:06 +0100 |
commit | 260788dbcc76f4b7b0855bfa48e23495a1561e91 (patch) | |
tree | 801c3b04edadaf93f3c05958031202f9adb39668 /searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h | |
parent | c71bc7f0582f0c29476310dec2c1c12762bcbb8d (diff) | |
parent | 1fb56a093caf4369189e0d00ff3e406d674ec420 (diff) |
Merge pull request #25919 from vespa-engine/toregge/pass-optional-serial-num-to-prepare-reconfigv8.121.38
Pass optional serial num to prepare reconfig
Diffstat (limited to 'searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h')
-rw-r--r-- | searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h b/searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h index 21ea117f7e9..d35a2211397 100644 --- a/searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h +++ b/searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h @@ -10,26 +10,31 @@ class DocumentSubDBReconfig; /** * Class representing the result of the prepare step of a DocumentDB reconfig. * - * The reconfig is performed in two steps: + * The reconfig is performed in three steps: * Prepare: * Based on the config that is changed, new components are instantiated in each subdb. * This can be costly and is handled by helper threads from the shared executor pool. * + * Complete prepare: + * Docid limit and serial number are used to complete prepared reconfig. + * * Apply: * The new components are swapped with the old ones in the DocumentDB master write thread. */ class DocumentDBReconfig { private: - std::unique_ptr<const DocumentSubDBReconfig> _ready_reconfig; - std::unique_ptr<const DocumentSubDBReconfig> _not_ready_reconfig; + std::unique_ptr<DocumentSubDBReconfig> _ready_reconfig; + std::unique_ptr<DocumentSubDBReconfig> _not_ready_reconfig; public: - DocumentDBReconfig(std::unique_ptr<const DocumentSubDBReconfig> ready_reconfig_in, - std::unique_ptr<const DocumentSubDBReconfig> not_ready_reconfig_in); + DocumentDBReconfig(std::unique_ptr<DocumentSubDBReconfig> ready_reconfig_in, + std::unique_ptr<DocumentSubDBReconfig> not_ready_reconfig_in); ~DocumentDBReconfig(); - const DocumentSubDBReconfig& ready_reconfig() const { return *_ready_reconfig; } - const DocumentSubDBReconfig& not_ready_reconfig() const { return *_not_ready_reconfig; } + const DocumentSubDBReconfig& ready_reconfig() const noexcept { return *_ready_reconfig; } + DocumentSubDBReconfig& ready_reconfig() noexcept { return *_ready_reconfig; } + const DocumentSubDBReconfig& not_ready_reconfig() const noexcept { return *_not_ready_reconfig; } + DocumentSubDBReconfig& not_ready_reconfig() noexcept { return *_not_ready_reconfig; } }; } |