Skip to content

Commit

Permalink
return PQRB tablet in ui (#14056)
Browse files Browse the repository at this point in the history
  • Loading branch information
adameat authored Feb 4, 2025
1 parent 0d1aa34 commit 3defd52
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 0 deletions.
42 changes: 42 additions & 0 deletions ydb/core/viewer/tests/canondata/result.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,48 @@
"status_code": 200,
"text": "1\n"
},
"test.test_pqrb_tablet": {
"response_create_topic": {
"version": "not-zero-number"
},
"response_tablet_info": {
"ResponseTime": "not-zero-number-text",
"TabletStateInfo": [
{
"ChangeTime": "not-zero-number-text",
"FollowerId": 0,
"Generation": 1,
"HiveId": "not-zero-number-text",
"Leader": true,
"NodeId": "not-zero-number",
"Overall": "Green",
"State": "Active",
"TabletId": "not-zero-number-text",
"TenantId": {
"PathId": "not-zero-number-text",
"SchemeShard": "not-zero-number-text"
},
"Type": "PersQueue"
},
{
"ChangeTime": "not-zero-number-text",
"FollowerId": 0,
"Generation": 1,
"HiveId": "not-zero-number-text",
"Leader": true,
"NodeId": "not-zero-number",
"Overall": "Green",
"State": "Active",
"TabletId": "not-zero-number-text",
"TenantId": {
"PathId": "not-zero-number-text",
"SchemeShard": "not-zero-number-text"
},
"Type": "PersQueueReadBalancer"
}
]
}
},
"test.test_storage_groups": {
"FieldsAvailable": "111111111111111111111",
"FieldsRequired": "111111111111111111111",
Expand Down
26 changes: 26 additions & 0 deletions ydb/core/viewer/tests/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -517,3 +517,29 @@ def test_viewer_query_issue_13945():
'query': 'SELECT AsList();',
'schema': 'multi'
})


def test_pqrb_tablet():
response_create_topic = call_viewer("/viewer/query", {
'database': dedicated_db,
'query': 'CREATE TOPIC topic1(CONSUMER consumer1)',
'schema': 'multi'
})
response_tablet_info = call_viewer("/viewer/tabletinfo", {
'database': dedicated_db,
'path': dedicated_db + '/topic1',
'enums': 'true'
})
result = {
'response_create_topic': response_create_topic,
'response_tablet_info': response_tablet_info,
}
return replace_values_by_key(result, ['version',
'ResponseTime',
'ChangeTime',
'HiveId',
'NodeId',
'TabletId',
'PathId',
'SchemeShard'
])
3 changes: 3 additions & 0 deletions ydb/core/viewer/viewer_tabletinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ class TJsonTabletInfo : public TJsonWhiteboardRequest<TEvWhiteboard::TEvTabletSt
for (const auto& partition : pathDescription.GetPersQueueGroup().GetPartitions()) {
Tablets[partition.GetTabletId()] = NKikimrTabletBase::TTabletTypes::PersQueue;
}
if (pathDescription.HasPersQueueGroup()) {
Tablets[pathDescription.GetPersQueueGroup().GetBalancerTabletID()] = NKikimrTabletBase::TTabletTypes::PersQueueReadBalancer;
}
if (pathDescription.HasRtmrVolumeDescription()) {
for (const auto& partition : pathDescription.GetRtmrVolumeDescription().GetPartitions()) {
Tablets[partition.GetTabletId()] = NKikimrTabletBase::TTabletTypes::RTMRPartition;
Expand Down

0 comments on commit 3defd52

Please sign in to comment.