-
Notifications
You must be signed in to change notification settings - Fork 1k
PHOENIX-7759: Preserve buffered mutations when batch size limit is exceeded #2371
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| if (!conflictingRows.isEmpty()) { | ||
| addMutations(dstMutations, tableRef, conflictingRows); | ||
| // Update estimatedSize only after actual state change | ||
| estimatedSize += conflictingRowsTotalSize; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Was this an existing gap which will be fixed with your change as I don't see size of conflicting rows being accounted right now?
| PhoenixIndexBuilderHelper.combineOnDupKey(this.onDupKeyBytes, newRow.onDupKeyBytes); | ||
|
|
||
| // Total size change (can be negative) | ||
| long totalSizeDiff = colValuesSizeDiff |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this also was an existing gap that the serialized bytes of ON DUPLICATE KEY was not accounted in mutation size along with accounting for merged indexes length.
I wonder if it can turn into backward incompatible change how size of same mutations can increase due to fixing of existing gaps. That means some previous use cases which were succeeding could fail now.
Should we tie up this new behaviour with this change i.e. only account for new size calculations when this feature is enabled?
|
@sanjeet006py Good eye on catching the gaps! Yes, both would be backwards incompatible but I didn't make it conditional because both are pretty corner case scenarios that are very unlikely to be of practical use cases. In fact, it can be considered a good idea if some remote use case is slipping through larger mutations than intended, as they would get caught and will make the developers to make adjustments, after all these can be considered as bug fixes. However, I am open to make them conditional if anyone has a solid counter argument. |
|
The spotless errors are outside the changed files in the PR and they are coming even though I already ran spotless. |
|
Most of checkstyle errors are also in existing lines. Only the below are in the changed lines: The second one is following the existing pattern so I will leave it as is for consistency. I will fix the first one. |
|
There us ibe junit test failure: This can't be related to my change and must be a flapper. |
Summary
phoenix.mutate.preserveOnLimitExceededthat changes mutation limit behavior, which can be overridden at the connection level via connection properties.MutationLimitReachedException(for executeUpdate) andMutationLimitBatchException(for executeBatch) to signal recoverable limit conditionsTest plan
JIRA: PHOENIX-7759