Yan-Daojiang has uploaded this change for review. ( http://gerrit.cloudera.org:8080/23844
Change subject: [tools] Add --preserve_table_ids flag to unsafe_rebuild ...................................................................... [tools] Add --preserve_table_ids flag to unsafe_rebuild When rebuilding master metadata using `kudu master unsafe_rebuild`, the tool previously generated new table IDs. This causes issues when fine-grained access control is enabled (--tserver_enforce_access_control), because the access control system validates table IDs. After a rebuild, the new table IDs don't match the original ones stored in tablet metadata, causing operations like `kudu perf table_scan` and Impala queries to fail with authorization errors. This patch adds a new `--preserve_table_ids` flag that preserves the original table IDs from tablet servers' metadata. The flag is disabled by default to maintain backward compatibility. Changes: - Added table_id field to TabletStatusPB in tablet.proto - Modified TabletReplica::GetTabletStatusPB() to populate table_id - Added --preserve_table_ids flag to MasterRebuilder - Added consistency check for table_id across replicas when flag is enabled - Added unit tests for the new functionality Change-Id: I6ae4353564922312d646f0323271d804e32e3b0d --- M src/kudu/tablet/tablet.proto M src/kudu/tablet/tablet_replica.cc M src/kudu/tools/kudu-admin-test.cc M src/kudu/tools/master_rebuilder.cc M src/kudu/tools/tool_action_master.cc 5 files changed, 184 insertions(+), 3 deletions(-) git pull ssh://gerrit.cloudera.org:29418/kudu refs/changes/44/23844/1 -- To view, visit http://gerrit.cloudera.org:8080/23844 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I6ae4353564922312d646f0323271d804e32e3b0d Gerrit-Change-Number: 23844 Gerrit-PatchSet: 1 Gerrit-Owner: Yan-Daojiang <[email protected]>
