Skip to content

Conversation

@sidkhillon
Copy link
Contributor

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 configuring sleepForRetries on a per-peer basis, with fallback to the global configuration when not set. It also adds UI support for displaying the field and shell support for editing the value.

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
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 47s 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 15s Maven dependency ordering for branch
+1 💚 mvninstall 3m 28s branch-2 passed
+1 💚 compile 4m 45s branch-2 passed
+1 💚 checkstyle 1m 12s branch-2 passed
+1 💚 spotbugs 4m 20s branch-2 passed
+1 💚 spotless 0m 52s branch has no errors when running spotless:check.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 19s Maven dependency ordering for patch
+1 💚 mvninstall 3m 20s the patch passed
+1 💚 compile 4m 49s the patch passed
+1 💚 cc 4m 49s the patch passed
+1 💚 javac 4m 49s the patch passed
+1 💚 blanks 0m 0s The patch has no blanks issues.
+1 💚 checkstyle 1m 6s the patch passed
-0 ⚠️ rubocop 0m 11s /results-rubocop.txt The patch generated 13 new + 481 unchanged - 3 fixed = 494 total (was 484)
+1 💚 spotbugs 5m 14s the patch passed
+1 💚 hadoopcheck 17m 12s Patch does not cause any errors with Hadoop 2.10.2 or 3.3.6 3.4.1.
+1 💚 hbaseprotoc 1m 39s the patch passed
+1 💚 spotless 0m 45s patch has no errors when running spotless:check.
_ Other Tests _
+1 💚 asflicense 0m 36s The patch does not generate ASF License warnings.
53m 20s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/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 0a9028718d6b 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 / 14fdbac
Default Java Eclipse Adoptium-11.0.23+9
Max. process+thread count 80 (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/2/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.

@Apache-HBase
Copy link

🎊 +1 overall

Vote Subsystem Runtime Logfile Comment
+0 🆗 reexec 0m 48s 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 22s Maven dependency ordering for branch
+1 💚 mvninstall 3m 7s branch-2 passed
+1 💚 compile 2m 10s branch-2 passed
+1 💚 javadoc 1m 6s branch-2 passed
+1 💚 shadedjars 6m 31s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 13s Maven dependency ordering for patch
+1 💚 mvninstall 3m 14s the patch passed
+1 💚 compile 2m 12s the patch passed
+1 💚 javac 2m 12s the patch passed
+1 💚 javadoc 1m 6s 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 8s hbase-client in the patch passed.
+1 💚 unit 210m 26s hbase-server in the patch passed.
+1 💚 unit 7m 11s hbase-shell in the patch passed.
258m 53s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/artifact/yetus-jdk17-hadoop3-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux f5e519c5699d 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 / 14fdbac
Default Java Eclipse Adoptium-17.0.11+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/testReport/
Max. process+thread count 3240 (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/2/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 45s 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 2m 51s branch-2 passed
+1 💚 compile 1m 42s branch-2 passed
+1 💚 javadoc 1m 3s branch-2 passed
+1 💚 shadedjars 5m 31s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 2m 26s the patch passed
+1 💚 compile 1m 46s the patch passed
+1 💚 javac 1m 46s the patch passed
+1 💚 javadoc 1m 4s the patch passed
+1 💚 shadedjars 5m 34s 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 59s hbase-client in the patch passed.
+1 💚 unit 214m 48s hbase-server in the patch passed.
+1 💚 unit 7m 6s hbase-shell in the patch passed.
259m 1s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/artifact/yetus-jdk8-hadoop2-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux b9b887ef33c8 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 / 14fdbac
Default Java Temurin-1.8.0_412-b08
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/testReport/
Max. process+thread count 3076 (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/2/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 47s 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 29s Maven dependency ordering for branch
+1 💚 mvninstall 3m 9s branch-2 passed
+1 💚 compile 2m 2s branch-2 passed
+1 💚 javadoc 1m 3s branch-2 passed
+1 💚 shadedjars 6m 49s branch has no errors when building our shaded downstream artifacts.
_ Patch Compile Tests _
+0 🆗 mvndep 0m 14s Maven dependency ordering for patch
+1 💚 mvninstall 3m 22s 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 48s 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 4s hbase-client in the patch passed.
+1 💚 unit 220m 39s hbase-server in the patch passed.
+1 💚 unit 7m 14s hbase-shell in the patch passed.
269m 40s
Subsystem Report/Notes
Docker ClientAPI=1.43 ServerAPI=1.43 base: https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/artifact/yetus-jdk11-hadoop3-check/output/Dockerfile
GITHUB PR #7578
Optional Tests javac javadoc unit compile shadedjars
uname Linux 03ad3473717d 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 / 14fdbac
Default Java Eclipse Adoptium-11.0.23+9
Test Results https://ci-hbase.apache.org/job/HBase-PreCommit-GitHub-PR/job/PR-7578/2/testReport/
Max. process+thread count 3327 (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/2/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.

2 participants