Details
-
Improvement
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
-
None
Description
// If delta amount to apply is 0, don't write WAL or MemStore. long deltaAmount = getLongValue(delta); // TODO: Does zero value mean reset Cell? For example, the ttl. apply = deltaAmount != 0;
This is an optimization when increment 0. But it introduced some new problems.
1.As the TODO said, Does zero value mean reset ttl?
2.HBASE-17318 have to introduce a new variable "firstWrite" because it don't apply 0.
3. There is a coprocessor method postMutationBeforeWAL to return a new cell. But it may be not applied.
// Give coprocessors a chance to update the new cell if (coprocessorHost != null) { newCell = coprocessorHost.postMutationBeforeWAL(mutationType, mutation, currentValue, newCell); } // If apply, we need to update memstore/WAL with new value; add it toApply. if (apply || firstWrite) { toApply.add(newCell); }
So my proposal is remove this optimization. Any suggestions are welcomed.
Attachments
Attachments
Issue Links
- links to