HBASE-29716 Include sequence ID metadata for HFiles generated by incremental backups#7480
Open
krconv wants to merge 2 commits intoapache:masterfrom
Open
HBASE-29716 Include sequence ID metadata for HFiles generated by incremental backups#7480krconv wants to merge 2 commits intoapache:masterfrom
krconv wants to merge 2 commits intoapache:masterfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
7317c4d to
94750f1
Compare
94750f1 to
45234b1
Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
hgromer
reviewed
Nov 25, 2025
| } | ||
|
|
||
| private void close(final StoreFileWriter w) throws IOException { | ||
| private void close(final StoreFileWriter w, final WriterInfo wl) throws IOException { |
Contributor
There was a problem hiding this comment.
Small thing, mind changing wl to wi here to match the rest of the patch?
hgromer
reviewed
Nov 25, 2025
| wl.written += length; | ||
| wi.writer.append((ExtendedCell) kv); | ||
| wi.written += length; | ||
| wi.maxSequenceId = Math.max(kv.getSequenceId(), wi.maxSequenceId); |
Contributor
There was a problem hiding this comment.
Any concerns that Cell#getSequenceId is removed in HBase 3? Any plans for how we should handle that?
Contributor
There was a problem hiding this comment.
Ah, as long as this is an ExtendedCell looks like this should be possible in branch-3
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
d440969 to
e4921a1
Compare
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The HFiles generated by incremental backups cannot be properly read by tooling such as the ClientSideRequestScanner, because the generated HFiles do not include the MAX_SEQ_ID metadata. The scanner will ignore cell-level sequence IDs and instead sort the HFiles arbitrarily. This causes incorrect results when scanning overwrites to cells with the same timestamp.
This PR adds a new option to the HFileOutputFormat2 that will calculate and set the required metadata. This only really effects the ClientSideRequestScanner, as the sequence ID will be recalculated when bulk-loaded anyways.
Part of https://issues.apache.org/jira/browse/HBASE-29716