Merge pull request #62127 from ClickHouse/y2k_system_replicas_2

More than 255 replicas in ReplicatedTableStatus
This commit is contained in:
Alexander Gololobov 2024-04-08 13:45:43 +02:00 committed by GitHub
commit 98ec4d7a70
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -24,8 +24,8 @@ struct ReplicatedTableStatus
UInt64 log_max_index;
UInt64 log_pointer;
UInt64 absolute_delay;
UInt8 total_replicas;
UInt8 active_replicas;
UInt32 total_replicas;
UInt32 active_replicas;
UInt64 lost_part_count;
String last_queue_update_exception;
/// If the error has happened fetching the info from ZooKeeper, this field will be set.

View File

@ -7022,7 +7022,7 @@ void StorageReplicatedMergeTree::getStatus(ReplicatedTableStatus & res, bool wit
}
res.log_pointer = log_pointer_str.empty() ? 0 : parse<UInt64>(log_pointer_str);
res.total_replicas = all_replicas.size();
res.total_replicas = UInt32(all_replicas.size());
if (get_result[1].error == Coordination::Error::ZNONODE)
res.lost_part_count = 0;
else