Skip to content

POC for size and timeout based flush at SourceShipper - #7591

Closed
ankitsol wants to merge 25 commits into
apache:HBASE-28957_rebasedfrom
ankitsol:as.poc2
Closed

POC for size and timeout based flush at SourceShipper#7591
ankitsol wants to merge 25 commits into
apache:HBASE-28957_rebasedfrom
ankitsol:as.poc2

Conversation

@ankitsol

@ankitsolankitsol commented Jan 5, 2026

Copy link
Copy Markdown
Contributor

This is followup POC of #7528

This is needed for continuous backup and PITR feature: https://github.com/apache/hbase/pull/7445/files

Here instead of ReplicationEndpoint handling flush and offset update, ReplicationSourceShipper is using time based and size based logic to flush and update replication offset

Please ignore the failing tests

vinayakphegdeand others added 25 commits November 6, 2025 08:08
…p to External Storage (apache#6633)
* HBASE-28996: Implement Custom ReplicationEndpoint to Enable WAL Backup to External Storage
* fix spotless error
…ckup (apache#6710)
* HBASE-29025: Enhance the full backup command to support continuous backup
* add new check for full backup command regards to continuous backup flag
* minor fixes
…pache#6848)
Signed-off-by: Andor Molnár <andor@apache.org>
Signed-off-by: Wellington Chevreuil <wchevreuil@apache.org>
…ritical backups and propose correct approach (apache#6922)
* improve the logic of backup deletion validation of PITR-critical backups
* add new tests
…he#6717)
Signed-off-by: Andor Molnar <andor@apache.org>
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
…nd (apache#7007)
* Store bulkload files in daywise bucket as well
* Integrate backup WAL cleanup logic with the delete command
* address the review comments
* address the review comments
* address the review comments
* add more unit tests to cover all cases
* address the review comments
)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Signed-off-by: Andor Molnár andor@apache.org
Reviewed by: Kota-SH <shanmukhaharipriya@gmail.com>
Reviewed by: Vinayak Hegde <vinayakph123@gmail.com>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…up is Force Deleted (apache#7090)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org> Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
apache#7106)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kota-SH <shanmukhaharipriya@gmail.com>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…inuous Backup (apache#7119)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…che#7045)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…che#7153)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
…tries handling to ReplicationEndpoint (apache#7145)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
…g Incremental Backup (apache#7166)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…7150)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
…larity (apache#7171)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Signed-off-by: Andor Molnár <andor@apache.org>
…pache#7239)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Reviewed by: Kota-SH <shanmukhaharipriya@gmail.com>
apache#7246)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
…e#7300)
Signed-off-by: Tak Lon (Stephen) Wu <taklwu@apache.org>
Signed-off-by: Andor Molnár andor@apache.org
Reviewed by: Kevin Geiszler <kevin.j.geiszler@gmail.com>
Reviewed by: Kota-SH <shanmukhaharipriya@gmail.com>
… backup (apache#7400)
* Scan WALs to identify bulkload operations for incremental backup
* Update unit test
* Info log
* Minor test fix
* Address review comments
* Spotless apply
* Addressed review comment
* spotless
* Remove log
* Retrigger CI
---------
Co-authored-by: Ankit Solomon <asolomon@cloudera.com>
@Apache-HBase

Copy link
Copy Markdown

🎊 +1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec1m 23sDocker mode activated.
_ Prechecks _
+1 💚dupname0m 0sNo case conflicting files found.
+0 🆗codespell0m 0scodespell was not available.
+0 🆗detsecrets0m 0sdetect-secrets was not available.
+1 💚@author0m 0sThe patch does not contain any @author tags.
+1 💚hbaseanti0m 0sPatch does not have any anti-patterns.
_ HBASE-28957_rebased Compile Tests _
+0 🆗mvndep0m 14sMaven dependency ordering for branch
+1 💚mvninstall2m 49sHBASE-28957_rebased passed
+1 💚compile2m 59sHBASE-28957_rebased passed
+1 💚checkstyle0m 54sHBASE-28957_rebased passed
+1 💚spotbugs1m 37sHBASE-28957_rebased passed
+1 💚spotless0m 40sbranch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗mvndep0m 10sMaven dependency ordering for patch
+1 💚mvninstall2m 16sthe patch passed
+1 💚compile2m 58sthe patch passed
-0 ⚠️javac0m 24s/results-compile-javac-hbase-backup.txthbase-backup generated 2 new + 141 unchanged - 0 fixed = 143 total (was 141)
+1 💚blanks0m 0sThe patch has no blanks issues.
+1 💚checkstyle0m 53sthe patch passed
+1 💚spotbugs1m 46sthe patch passed
+1 💚hadoopcheck8m 37sPatch does not cause any errors with Hadoop 3.3.6 3.4.1.
+1 💚spotless0m 34spatch has no errors when running spotless:check.
_ Other Tests _
+1 💚asflicense0m 14sThe patch does not generate ASF License warnings.
33m 38s
SubsystemReport/Notes
DockerClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7591/1/artifact/yetus-general-check/output/Dockerfile
GITHUB PR#7591
Optional Testsdupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless
unameLinux 901b51fb6aed 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionHBASE-28957_rebased / baf7146
Default JavaEclipse Adoptium-17.0.11+9
Max. process+thread count87 (vs. ulimit of 30000)
modulesC: hbase-server hbase-backup U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7591/1/console
versionsgit=2.34.1 maven=3.9.8 spotbugs=4.7.3
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase

Copy link
Copy Markdown

💔 -1 overall

VoteSubsystemRuntimeLogfileComment
+0 🆗reexec1m 27sDocker mode activated.
-0 ⚠️yetus0m 3sUnprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ HBASE-28957_rebased Compile Tests _
+0 🆗mvndep0m 13sMaven dependency ordering for branch
+1 💚mvninstall2m 46sHBASE-28957_rebased passed
+1 💚compile1m 0sHBASE-28957_rebased passed
+1 💚javadoc0m 33sHBASE-28957_rebased passed
+1 💚shadedjars4m 33sbranch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗mvndep0m 12sMaven dependency ordering for patch
+1 💚mvninstall2m 17sthe patch passed
+1 💚compile1m 0sthe patch passed
+1 💚javac1m 0sthe patch passed
+1 💚javadoc0m 31sthe patch passed
+1 💚shadedjars4m 31spatch has no errors when building our shaded downstream artifacts.
_ Other Tests _
-1 ❌unit238m 21s/patch-unit-hbase-server.txthbase-server in the patch failed.
-1 ❌unit57m 13s/patch-unit-hbase-backup.txthbase-backup in the patch failed.
318m 44s
SubsystemReport/Notes
DockerClientAPI=1.48 ServerAPI=1.48 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7591/1/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR#7591
Optional Testsjavac javadoc unit compile shadedjars
unameLinux 233ac954ebde 6.8.0-1024-aws #26~22.04.1-Ubuntu SMP Wed Feb 19 06:54:57 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux
Build toolmaven
Personalitydev-support/hbase-personality.sh
git revisionHBASE-28957_rebased / baf7146
Default JavaEclipse Adoptium-17.0.11+9
Test Resultshttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7591/1/testReport/
Max. process+thread count5362 (vs. ulimit of 30000)
modulesC: hbase-server hbase-backup U: .
Console outputhttps://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7591/1/console
versionsgit=2.34.1 maven=3.9.8
Powered byApache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

}

private void flushStagedWal() {
source.getReplicationEndpoint().beforePersistingReplicationOffset();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What if persisting the WAL entries fails at the endpoint? In that case, we should throw an exception and fail here as well, since we cannot move forward until the entries are successfully persisted at the endpoint.

@Apache9Apache9 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I suggest we implement the POC based on the current master code base, and then applied the continous backup code on top of it. Otherwise it is a bit difficult to figure out what is the real modification for implementing this mechanism and what is because we have already supported continuius backup...

// Loop until we close down
while (isActive()) {
// check if flush needed for WAL backup, this is need for timeout based flush
if (shouldFlushStagedWal()) {

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The name is a bit confusing, which still assumes that the WAL entries we send to ReplicationEndpoint are 'staged'...

Just name it 'shouldPersistLogPosition'. And we already have a logPositionAndCleanOldLogs method?

Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants

@ankitsol@Apache-HBase@Apache9@vinayakphegde@anmolnar@asolomonC