Alexey Serbin has submitted this change and it was merged. ( 
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 and enabled by default
that preserves the original table IDs from tablet servers' metadata.

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
Reviewed-on: http://gerrit.cloudera.org:8080/23844
Tested-by: Alexey Serbin <[email protected]>
Reviewed-by: Alexey Serbin <[email protected]>
---
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, 342 insertions(+), 3 deletions(-)

Approvals:
  Alexey Serbin: Looks good to me, approved; Verified

--
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: merged
Gerrit-Change-Id: I6ae4353564922312d646f0323271d804e32e3b0d
Gerrit-Change-Number: 23844
Gerrit-PatchSet: 10
Gerrit-Owner: Yan-Daojiang <[email protected]>
Gerrit-Reviewer: Alexey Serbin <[email protected]>
Gerrit-Reviewer: Ashwani Raina <[email protected]>
Gerrit-Reviewer: Gabriella Lotz <[email protected]>
Gerrit-Reviewer: Kudu Jenkins (120)
Gerrit-Reviewer: Yan-Daojiang <[email protected]>

Reply via email to