From 90c542347acc89a424c112310ba0f6c2d559fc6d Mon Sep 17 00:00:00 2001 From: Sagar Vemuri Date: Tue, 27 Mar 2018 16:57:32 -0700 Subject: [PATCH] Update comments about MergeOperator::AllowSingleOperand Summary: Updated comments around AllowSingleOperand. Reason: A couple of users were confused and encountered issues due to no overriding PartialMerge with AllowSingleOperand=true. I'll also look into modifying the default merge operator implementation so that overriding PartialMerge is not mandatory when AllowSingleOp=true. Closes https://github.com/facebook/rocksdb/pull/3659 Differential Revision: D7422691 Pulled By: sagar0 fbshipit-source-id: 3d075a6ced0120f5d65cb7ae5412936f1862f342 --- include/rocksdb/merge_operator.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/include/rocksdb/merge_operator.h b/include/rocksdb/merge_operator.h index 9b36c3bf8..cd7563cff 100644 --- a/include/rocksdb/merge_operator.h +++ b/include/rocksdb/merge_operator.h @@ -185,9 +185,9 @@ class MergeOperator { // Determines whether the MergeOperator can be called with just a single // merge operand. - // Override and return true for allowing a single operand. FullMergeV2 and - // PartialMerge/PartialMergeMulti should be implemented accordingly to handle - // a single operand. + // Override and return true for allowing a single operand. Both FullMergeV2 + // and PartialMerge/PartialMergeMulti should be overridden and implemented + // correctly to handle a single operand. virtual bool AllowSingleOperand() const { return false; } // Allows to control when to invoke a full merge during Get. -- GitLab