-
Notifications
You must be signed in to change notification settings - Fork 3.4k
HBASE-29796 [branch-2] Allow sleepForRetry replication config to be overridden by replication peers #7578
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: branch-2
Are you sure you want to change the base?
Conversation
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
| optional string remoteWALDir = 12; | ||
| optional int64 sleep_for_retries = 13; |
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.
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.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
|
🎊 +1 overall
This message was automatically generated. |
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