Skip to content

Commit

Permalink
Update comments about MergeOperator::AllowSingleOperand
Browse files Browse the repository at this point in the history
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 facebook#3659

Differential Revision: D7422691

Pulled By: sagar0

fbshipit-source-id: 3d075a6ced0120f5d65cb7ae5412936f1862f342
  • Loading branch information
sagar0 authored and facebook-github-bot committed Mar 28, 2018
1 parent d687670 commit 90c5423
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions include/rocksdb/merge_operator.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 90c5423

Please sign in to comment.