Environment
- YugabyteDB - 2.14.0 - 2.14.16
- YugabyteDB - 2.18.0 - 2.18.7
- YugabyteDB - 2.20.0 - 2.20.3
Issue
The YugabyteDB Anywhere (YBA) Alerts tab reports a leaderless tablet alert. In some cases, this can be a false positive. For example:
-
The Master Leader UI shows the load balancer status as Balanced
-
However, the Replica Info view (Master Leader UI → Utilities) still lists some leaderless tablets
These leaderless tablets are typically hidden split parent tablets that haven’t been deleted yet and are considered false positives.
False Positive Scenario
This behaviour is seen in the following cases:
-
-
With PITR Enabled: When a table is dropped, its tablets aren't immediately deleted due to the configured retention window. Instead, they are moved to a hidden state until the PITR window expires.
-
Without PITR: If a split child tablet fails to register, the parent tablet remains hidden and persists in that state for an extended period (typically longer than 120 seconds).
-
Note: While this article primarily focuses on false positive leaderless tablet alerts, it also includes basic guidance on how to identify and take general resolution steps for legit leaderless tablets. Not all leaderless tablet alerts are false positives some may indicate valid issues such as tablet placement issues, network connectivity problems, or unavailable nodes.
Cause
When a tablet is marked as TABLET_DATA_SPLIT_COMPLETED, its metrics are excluded from being sent to the master. As a result, the master does not update the leader lease for that tablet, which can lead to it being incorrectly reported as leaderless.
Steps To Identify Issue
1. Tablet Report
- Generate a tablet report by following the instructions in this KB article-> https://support.yugabyte.com/hc/en-us/articles/6111093115405-How-to-use-the-Yugatool-utility
Parse Tablet Report
- If you have not previously downloaded
tablet-report-parser.pl, you can obtain it:
Download from Yugabyte's github (README Document)
You can run the parser on any Linux, Windows or Mac machine that has perl and sqlite3 installed. - Parse the report using
tablet-report-parser.plscript. Thetablet-report-parser.plscript parses a Yugatool tablet report and generates a SQLite database with useful summaries such as leaderless tablet report for quick analysis. - Generate a
.sqlitedatabase from the tablet report by running the following command:
perl tablet_report_parser.pl tablet-report-HOST.DATE.out
- Once the SQLite database is created, load it using the following command:
sqlite3 -header -column /path/to/tablet-report.CLUSTERNAME.sqlite
- To check for leaderless tablets, use these queries:
sqlite> select count(*) from leaderless;
or
sqlite> select * from leaderless;
- This will list tablets with no leader. This query will return no rows if all reported leaderless tablets are false positives.
Note: If the query return's a tablet then those are legitimate leaderless tablets.
2.Master-Leader UI
Replica-Info View
- Where we can see leaderless tablets.
- In this example, we can see that
357e00d6c9bb4e23b5855a9a41fa3fd8is the tablet that is marked as leaderless.
Tables view
-
From the replica info page, you can click on the table name associated with the leaderless tablet to open its corresponding details page.
- Search the uuid of that tablet.
-
In this example, the tablet with ID
357e00d6c9bb4e23b5855a9a41fa3fd8is a split parent tablet, and it is marked as hidden. A value ofHidden=1indicates the tablet is hidden, whileHidden=0means it is not.
Resolution
For hidden split parent tablets:
This issue is resolved in following YugabyteDB versions :
-
2.14.17+
-
2.18.8+
-
2.20.4+
-
2024.1.0.0+
In older versions, the false positive alerts will automatically clear after the PITR retention window expires.
https://github.com/yugabyte/yugabyte-db/issues/21371 - GHI which addressed this issue
For legitimately leaderless tablets:
Step 1: Verify Node Status
Ensure that all yb-tserver nodes are online and healthy.
-
UI Check:
Use the YBA → Nodes tab and the Master Leader UI to confirm node status. -
Command Line Check:
On each node, confirm that theyb-tserverprocess is running:
Step 2: Check Network Connectivity
Verify that there are no network issues preventing communication between the YB-TServers and YB-Masters. Ensure all nodes can reach each other over the expected ports.
Step 3: Contact Support
If the issue persists after verifying node health and connectivity, contact Yugabyte Support for further assistance and deeper investigation.
Comments
0 comments
Please sign in to leave a comment.