[DocDB] The master `/api/v1/tablet-servers` endpoint might display incorrect/incomplete data
#15 655 ouverte le 12 janv. 2023
Métriques du dépôt
- Stars
- (8 229 stars)
- Métriques de merge PR
- (Merge moyen 17j 21h) (92 PRs mergées en 30 j)
Description
Jira Link: DB-5024
Description
YugabyteDB 2.17.0.0b24 Linux Alma8.7
When multiple tablet servers are stopped, the HTTP endpoint name seems to be removed from the metadata the master keeps:
And the tablet server UUID is used.
However, in the endpoint /api/v1/tablet-servers, it uses a different construction than /api/v1/masters, and show a map of objects (being the tablet servers) inside an unnamed object (?).
The map of objects (which are the tablet servers) is listed by the name of the HTTP endpoint name. If the HTTP endpoint name is removed (like can be seen in the screenshot above), the name gets empty. If multiple names get empty, still only one is showed. This leads to incomplete data being shown.
Please list the tablet servers by their UUID, like is done for the masters, so /api/v1/tablet-servers can show the truth.
Data in /api/v1/tablet-servers for above screenshot situation:
❯ curl -s http://192.168.66.80:7000/api/v1/tablet-servers | jq
{
"": {
"": {
"time_since_hb": "647.3s",
"time_since_hb_sec": 647.276403855,
"status": "DEAD",
"uptime_seconds": 0,
"ram_used": "0 B",
"ram_used_bytes": 0,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 0,
"active_tablets": 0,
"cloud": "local",
"region": "local",
"zone": "local5"
},
"yb-8.local:9000": {
"time_since_hb": "164.8s",
"time_since_hb_sec": 164.814628727,
"status": "DEAD",
"uptime_seconds": 0,
"ram_used": "0 B",
"ram_used_bytes": 0,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 0,
"active_tablets": 4,
"cloud": "local",
"region": "local2",
"zone": "local2"
},
"yb-3.local:9000": {
"time_since_hb": "0.3s",
"time_since_hb_sec": 0.260432171,
"status": "ALIVE",
"uptime_seconds": 579,
"ram_used": "25.13 MB",
"ram_used_bytes": 25133056,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 168222720,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 3,
"active_tablets": 4,
"cloud": "local",
"region": "local3",
"zone": "local3"
},
"yb-1.local:9000": {
"time_since_hb": "0.3s",
"time_since_hb_sec": 0.270004779,
"status": "ALIVE",
"uptime_seconds": 636,
"ram_used": "25.31 MB",
"ram_used_bytes": 25313280,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 167034880,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 2,
"active_tablets": 4,
"cloud": "local",
"region": "local1",
"zone": "local1"
},
"yb-4.local:9000": {
"time_since_hb": "0.4s",
"time_since_hb_sec": 0.395968008,
"status": "ALIVE",
"uptime_seconds": 549,
"ram_used": "32.93 MB",
"ram_used_bytes": 32931840,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 147513344,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 2,
"active_tablets": 4,
"cloud": "local",
"region": "local1",
"zone": "local1"
},
"yb-9.local:9000": {
"time_since_hb": "0.1s",
"time_since_hb_sec": 0.074897845,
"status": "ALIVE",
"uptime_seconds": 336,
"ram_used": "35.65 MB",
"ram_used_bytes": 35651584,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 142802944,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 1,
"active_tablets": 4,
"cloud": "local",
"region": "local3",
"zone": "local3"
},
"yb-7.local:9000": {
"time_since_hb": "1.0s",
"time_since_hb_sec": 0.954664577,
"status": "ALIVE",
"uptime_seconds": 415,
"ram_used": "24.89 MB",
"ram_used_bytes": 24887296,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 142950400,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 2,
"active_tablets": 4,
"cloud": "local",
"region": "local1",
"zone": "local1"
},
"yb-6.local:9000": {
"time_since_hb": "0.9s",
"time_since_hb_sec": 0.949073219,
"status": "ALIVE",
"uptime_seconds": 459,
"ram_used": "32.16 MB",
"ram_used_bytes": 32161792,
"num_sst_files": 0,
"total_sst_file_size": "0 B",
"total_sst_file_size_bytes": 0,
"uncompressed_sst_file_size": "0 B",
"uncompressed_sst_file_size_bytes": 0,
"path_metrics": [
{
"path": "/mnt/d0",
"space_used": 134942720,
"total_space_size": 10724835328
}
],
"read_ops_per_sec": 0,
"write_ops_per_sec": 0,
"user_tablets_total": 0,
"user_tablets_leaders": 0,
"system_tablets_total": 4,
"system_tablets_leaders": 2,
"active_tablets": 4,
"cloud": "local",
"region": "local3",
"zone": "local3"
}
}
}