phoenix icon indicating copy to clipboard operation
phoenix copied to clipboard

PHOENIX-6786 SequenceRegionObserver should use batch mutation coproc hook

Open apurtell opened this issue 2 years ago • 1 comments

apurtell avatar Jan 11 '23 00:01 apurtell

@kadirozde Is this the kind of refactoring you had in mind?

This patch:

  • Adds a preBatchMutate hook to SequenceRegionObserver that will filter any Append or Increment operations submitted in batch and handle them ahead of base HBase processing. Puts and Deletes will be passed through to normal handling as required. Phoenix rewrites Increments on the sequence table into Puts to same and submits them by Region#batchMutate, which would set up a cycle with preBatchMutate otherwise, I believe.
  • Retains existing hooks for preAppend and preIncrement that are necessary for intercepting other APIs.
  • Refactors most logic to reusable private methods.

apurtell avatar Jan 11 '23 00:01 apurtell