Skip to content

Commit 9360318

Browse files
author
caijieming
committed
show bugfix, if tablet more than 20000, teracli unable to show all tablet
1 parent bf9fbf3 commit 9360318

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/master/tablet_manager.cc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1285,7 +1285,7 @@ bool TabletManager::ShowTable(std::vector<TablePtr>* table_meta_list,
12851285
table_meta_list->push_back(table);
12861286
}
12871287
table_found_num++;
1288-
if (it->first == start_tablet_key) {
1288+
if (it->first == start_table_name) {
12891289
it2 = table->tablets_list_.lower_bound(start_tablet_key);
12901290
} else {
12911291
it2 = table->tablets_list_.begin();

src/sdk/client_impl.cc

+4-1
Original file line numberDiff line numberDiff line change
@@ -729,6 +729,7 @@ bool ClientImpl::DoShowTablesInfo(TableMetaList* table_list,
729729
bool table_meta_copied = false;
730730
std::string err_msg;
731731
while(has_more && !has_error) {
732+
VLOG(7) << "round more " << has_more << ", " << DebugString(start_tablet_key);
732733
ShowTablesRequest request;
733734
ShowTablesResponse response;
734735
if (!table_name.empty()) {
@@ -780,7 +781,9 @@ bool ClientImpl::DoShowTablesInfo(TableMetaList* table_list,
780781
std::string last_key = response.tablet_meta_list().meta(i).key_range().key_start();
781782
if (prev_table_name > start_table_name
782783
|| (prev_table_name == start_table_name && last_key <= start_tablet_key)) {
783-
LOG(WARNING) << "the master has older version";
784+
LOG(WARNING) << "the master has older version, pre_table " << prev_table_name
785+
<< ", start_table " << start_table_name << ", last_key " << DebugString(last_key)
786+
<< ", start_key " << DebugString(start_tablet_key);
784787
has_more = false;
785788
break;
786789
}

0 commit comments

Comments
 (0)