aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore/src/vespa/searchcore/proton/server/document_db_reconfig.h
diff options
context:
space:
mode:
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.h19
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; }
};
}