-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[#24575] docdb: RF1 changed to any RF>1 will break leaderless tablet …
…endpoint Summary: Considering the following scenario: Originally it's RF1, all tablet leaders will report max ht lease to the master N1 (leader) : ht_lease: MAX_HT_LEASE Master leader: {N1: ht_lease=MAX_HT_LEASE} Edit the universe to make it RF3, the leader will report the normal ht lease to the master N1 (leader) : ht_lease: 300ms N2 (follower) N3 (follower) Master leader: {N1: ht_lease=MAX_HT_LEASE} When leader N1 reports its leader status to master, 300 < MAX_HT_LEASE, so it's considered as stale and skipped. Reports in the following 120seconds are all skipped, so that the tablet is reported as leaderless. This diff fixes this issue by accepting the ht_lease when the existing one is MAX_HT_LEASE. Also make the RF1 remaining ht_lease more readable, an RF1 tablet will show `+INF(RF1)`: ``` LEADER: 127.0.0.3 (HAS_LEASE) Remaining ht_lease: +INF(RF1) UUID: a335a08464a84de0991d51aefee9dee8 ``` Jira: DB-13612 Test Plan: Manual test: 1. Starts an RF3 universe and create a table with 1 tablet (assume tablet-1). 2. Remove two followers from the raft group of tablet-1 with `yb-admin change_config REMOVE_SERVER`. 3. Check the table page, see remaining ht_lease is showing as `+INF(RF1)`. 4. Add one follower back. 5. Check the table page, see remaining ht_lease becomes a normal value. 6. After 2mins, check leaderless tablet endpoint, shouldn't see tablet-1. MasterPathHandlersLeaderlessITest.* MasterPathHandlersLeaderlessRF3ITest.* MasterPathHandlersLeaderlessRF1ITest.* MasterPathHandlersItest.TestUndeletedParentTablet MasterPathHandlersItest.TestHiddenSplitParentTablet Reviewers: asrivastava Reviewed By: asrivastava Subscribers: esheng, ybase Differential Revision: https://phorge.dev.yugabyte.com/D39725
- Loading branch information
Showing
6 changed files
with
106 additions
and
18 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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