aboutsummaryrefslogtreecommitdiffstats
path: root/searchcore
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2021-01-22 18:52:39 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2021-01-22 18:52:39 +0000
commitcbc4027b6352c3e2c79311dafb5cac54c3ef6321 (patch)
tree1cb2c28c35294f23fa941e0df437b708c3b190f4 /searchcore
parente0600777500a76bb2d3cd545a02627f82007abb2 (diff)
Update comments and simplify by using auto
Diffstat (limited to 'searchcore')
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp2
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.h6
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_base.h4
-rw-r--r--searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_take2.h7
4 files changed, 6 insertions, 13 deletions
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
index c752b7950c3..7f60bbb3455 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.cpp
@@ -26,7 +26,7 @@ LidSpaceCompactionJob::scanDocuments(const LidUsageStats &stats)
_retryFrozenDocument = true;
return true;
} else {
- std::unique_ptr<MoveOperation> op = _handler.createMoveOperation(document, stats.getLowestFreeLid());
+ auto op = _handler.createMoveOperation(document, stats.getLowestFreeLid());
if ( ! op ) {
return false;
}
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.h b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.h
index 93c4ccfbc20..09539bdac6c 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.h
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job.h
@@ -8,11 +8,7 @@ namespace proton {
class IFrozenBucketHandler;
/**
- * Job that regularly checks whether lid space compaction should be performed
- * for the given handler.
- *
- * Compaction is handled by moving documents from high lids to low free lids.
- * A handler is typically working over a single document sub db.
+ * Moves documents from higher lids to lower lids. It uses a 'frozen' bucket mechanism to ensure that it has exclusive access to the document.
*/
class LidSpaceCompactionJob : public LidSpaceCompactionJobBase
{
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_base.h b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_base.h
index 4d3d830b0fb..86e20b4d645 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_base.h
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_base.h
@@ -20,8 +20,8 @@ namespace proton {
namespace proton {
/**
- * Job that regularly checks whether lid space compaction should be performed
- * for the given handler.
+ * This is a base class for moving documents from a high lid to a lower free
+ * lid in order to keep the lid space compact.
*
* Compaction is handled by moving documents from high lids to low free lids.
* A handler is typically working over a single document sub db.
diff --git a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_take2.h b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_take2.h
index 70aeaa04b59..96e6f0a0b7e 100644
--- a/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_take2.h
+++ b/searchcore/src/vespa/searchcore/proton/server/lid_space_compaction_job_take2.h
@@ -14,11 +14,8 @@ namespace proton {
namespace proton::lidspace {
/**
- * Job that regularly checks whether lid space compaction should be performed
- * for the given handler.
- *
- * Compaction is handled by moving documents from high lids to low free lids.
- * A handler is typically working over a single document sub db.
+ * Moves documents from higher lids to lower lids. It uses a BucketExecutor that ensures that the bucket
+ * is locked for changes while the document is moved.
*/
class CompactionJob : public LidSpaceCompactionJobBase
{