Skip to content

Conversation

@sidkhillon
Copy link
Contributor

@sidkhillon sidkhillon commented Dec 26, 2025

Currently, sleepForRetries (the sleep time between retry attempts during replication) is only configurable globally via the replication.source.sleepforretries configuration property. This makes it impossible to tune behavior for individual replication peers that may have different requirements.

This change would add support for overriding replication source config values on a per-peer basis, with fallback to the global configuration when not set.

This is related to #7577 and was created because that PR will not cleanly merge into branch-2

Add support for configuring sleepForRetries on a per-peer basis with
automatic fallback to global configuration when not set.

Changes:
- Add optional int64 sleep_for_retries field (13) to ReplicationPeer protobuf
- Field 12 reserved for remoteWALDir (future version compatibility)
- Add getSleepForRetries/setSleepForRetries to ReplicationPeerConfig/Builder
- Update ReplicationSource, ReplicationSourceWALReader, ReplicationSourceShipper
  to check peer config first, then fall back to global config
- Add set_peer_sleep_for_retries shell command
- Add Sleep For Retries column to Master UI Peers table
- Add tests to ReplicationPeerConfigTestUtil and replication_admin_test.rb

Behavior:
- Value > 0: Uses per-peer configured sleep time
- Value = 0 or not set: Falls back to global replication.source.sleepforretries
  config (default 1000ms)

Backward compatible: Optional protobuf field, old/new clients interoperate
Comment on lines 53 to 54
optional string remoteWALDir = 12;
optional int64 sleep_for_retries = 13;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am unsure of the intended approach here. In #7577, we add sleep_for_retries as field 13. However, remoteWALDir does not exist in branch-2. I have added it here as a dummy value so that upgrades from branch-2 to branch-3 can be done seamlessly. If that is not the right approach, I'm happy to change it.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase

This comment has been minimized.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 49s Docker mode activated.
_ Prechecks _
+1 💚 dupname 0m 0s No case conflicting files found.
+0 🆗 codespell 0m 0s codespell was not available.
+0 🆗 detsecrets 0m 0s detect-secrets was not available.
+0 🆗 buf 0m 0s buf was not available.
+0 🆗 buf 0m 0s buf was not available.
+1 💚 @author 0m 0s The patch does not contain any @author tags.
+1 💚 hbaseanti 0m 0s Patch does not have any anti-patterns.
_ branch-2 Compile Tests _
+0 🆗 mvndep 0m 41s Maven dependency ordering for branch
+1 💚 mvninstall 3m 32s branch-2 passed
+1 💚 compile 4m 49s branch-2 passed
+1 💚 checkstyle 1m 10s branch-2 passed
+1 💚 spotbugs 4m 22s branch-2 passed
+1 💚 spotless 0m 48s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 8s the patch passed
+1 💚 compile 4m 48s the patch passed
+1 💚 cc 4m 48s the patch passed
+1 💚 javac 4m 48s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 8s the patch passed
-0 ⚠️ rubocop 0m 11s /results-rubocop.txt The patch generated 3 new + 484 unchanged - 0 fixed = 487 total (was 484)
+1 💚 spotbugs 4m 43s the patch passed
+1 💚 hadoopcheck 17m 24s Patch does not cause any errors with Hadoop 2.10.2 or 3.3.6 3.4.1.
+1 💚 hbaseprotoc 1m 41s the patch passed
+1 💚 spotless 0m 44s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 35s The patch does not generate ASF License warnings.
53m 17s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/artifact/yetus-general-check/output/Dockerfile
GITHUB PR #7578
Optional Tests dupname asflicense javac spotbugs checkstyle codespell detsecrets compile hadoopcheck hbaseanti spotless cc buflint bufcompat hbaseprotoc rubocop
uname Linux 636546748adc 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 347a0e0
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 82 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/console
versions git=2.34.1 maven=3.9.8 spotbugs=4.7.3 rubocop=1.37.1
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Copy link
Contributor

@taklwu taklwu left a comment

Choose a reason for hiding this comment

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

LGTM, please wait till the precommit tests complete.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 44s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for branch
+1 💚 mvninstall 2m 30s branch-2 passed
+1 💚 compile 1m 43s branch-2 passed
+1 💚 javadoc 1m 1s branch-2 passed
+1 💚 shadedjars 5m 35s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for patch
+1 💚 mvninstall 2m 28s the patch passed
+1 💚 compile 1m 45s the patch passed
+1 💚 javac 1m 45s the patch passed
+1 💚 javadoc 1m 2s the patch passed
+1 💚 shadedjars 5m 28s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 0m 25s hbase-protocol-shaded in the patch passed.
+1 💚 unit 7m 58s hbase-client in the patch passed.
+1 💚 unit 227m 33s hbase-server in the patch passed.
+1 💚 unit 7m 14s hbase-shell in the patch passed.
271m 12s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux 21b4c6c8168a 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 347a0e0
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/testReport/
Max. process+thread count 3348 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s Docker mode activated.
-0 ⚠️ yetus 0m 6s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗 mvndep 0m 34s Maven dependency ordering for branch
+1 💚 mvninstall 3m 28s branch-2 passed
+1 💚 compile 2m 9s branch-2 passed
+1 💚 javadoc 1m 7s branch-2 passed
+1 💚 shadedjars 6m 34s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 12s Maven dependency ordering for patch
+1 💚 mvninstall 3m 5s the patch passed
+1 💚 compile 2m 9s the patch passed
+1 💚 javac 2m 9s the patch passed
+1 💚 javadoc 1m 5s the patch passed
+1 💚 shadedjars 6m 30s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 0m 32s hbase-protocol-shaded in the patch passed.
+1 💚 unit 8m 2s hbase-client in the patch passed.
+1 💚 unit 223m 1s hbase-server in the patch passed.
+1 💚 unit 6m 57s hbase-shell in the patch passed.
271m 56s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux ce54ecf6fede 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 347a0e0
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/testReport/
Max. process+thread count 3256 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 54s Docker mode activated.
-0 ⚠️ yetus 0m 5s Unprocessed flag(s): --brief-report-file --spotbugs-strict-precheck --author-ignore-list --blanks-eol-ignore-file --blanks-tabs-ignore-file --quick-hadoopcheck
_ Prechecks _
_ branch-2 Compile Tests _
+0 🆗 mvndep 0m 15s Maven dependency ordering for branch
+1 💚 mvninstall 3m 30s branch-2 passed
+1 💚 compile 2m 2s branch-2 passed
+1 💚 javadoc 1m 6s branch-2 passed
+1 💚 shadedjars 6m 46s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 20s Maven dependency ordering for patch
+1 💚 mvninstall 3m 4s the patch passed
+1 💚 compile 2m 3s the patch passed
+1 💚 javac 2m 3s the patch passed
+1 💚 javadoc 1m 4s the patch passed
+1 💚 shadedjars 6m 47s patch has no errors when building our shaded downstream artifacts.
_ Other Tests _
+1 💚 unit 0m 32s hbase-protocol-shaded in the patch passed.
+1 💚 unit 8m 12s hbase-client in the patch passed.
+1 💚 unit 233m 4s hbase-server in the patch passed.
+1 💚 unit 7m 2s hbase-shell in the patch passed.
281m 30s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux b42e4990aac6 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64 x86_64 x86_64 GNU/Linux
Build tool maven
Personality dev-support/hbase-personality.sh
git revision branch-2 / 347a0e0
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/testReport/
Max. process+thread count 3338 (vs. ulimit of 30000)
modules C: hbase-protocol-shaded hbase-client hbase-server hbase-shell U: .
Console output https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/8/console
versions git=2.34.1 maven=3.9.8
Powered by Apache Yetus 0.15.0 https://yetus.apache.org

This message was automatically generated.

Sign up for free to 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.

3 participants