提交 90c54234 编写于 作者: S Sagar Vemuri 提交者: Facebook Github Bot

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
上级 d6876702
...@@ -185,9 +185,9 @@ class MergeOperator { ...@@ -185,9 +185,9 @@ class MergeOperator {
// Determines whether the MergeOperator can be called with just a single // Determines whether the MergeOperator can be called with just a single
// merge operand. // merge operand.
// Override and return true for allowing a single operand. FullMergeV2 and // Override and return true for allowing a single operand. Both FullMergeV2
// PartialMerge/PartialMergeMulti should be implemented accordingly to handle // and PartialMerge/PartialMergeMulti should be overridden and implemented
// a single operand. // correctly to handle a single operand.
virtual bool AllowSingleOperand() const { return false; } virtual bool AllowSingleOperand() const { return false; }
// Allows to control when to invoke a full merge during Get. // Allows to control when to invoke a full merge during Get.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册