ReferencedTabletFile has getTableId method that may be misleading. #4094
Labels
enhancement
This issue describes a new feature, improvement, or optimization.
Projects
In
ReferencedTabletFile
and inherited byStoredTabletFile
there is a methodThe id is being derived by parsing the file path. If a table had been cloned, the id in the path may not be the table id. At a minimum, the method could be renamed, and possibly return an id that is not a TableId so that any id derived from the path cannot be directly used as a TableId.
The issue would be if someone assumed that the TableId returned from a ReferencedTabletFile was the same a the "real" table id and then made metadata changes based on incorrect information. Just using the method signature, it seems easy to make an incorrect assumption on what that id returned represents.
The text was updated successfully, but these errors were encountered: