Skip to content
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

Return PQRB tablet in UI #14056

Merged
merged 1 commit into from
Feb 4, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading