keith-turner commented on code in PR #4133:
URL: https://github.com/apache/accumulo/pull/4133#discussion_r1450891458
##########
server/manager/src/main/java/org/apache/accumulo/manager/split/SplitTask.java:
##########
@@ -84,8 +84,8 @@ public void run() {
return;
}
- var fateInstanceType =
-
FateInstanceType.toType(context.getTableIdToNameMap().get(tablet.getTableId()));
+ var fateInstanceType = FateInstanceType
+
.fromNamespaceOrTableName(context.getTableIdToNameMap().get(tablet.getTableId()));
Review Comment:
Going from a table id to a table name is tricky because there can be race
conditions with rename table. Generally its best to operate only on the table
id when its present.
Was thinking we could add something like the following to FateInstanceType
to address this case.
```java
public static FateInstanceType fromTableId(TableId tableId) {
if(RootTable.ID.equals(tableId) || MetadataTable.ID.equals(tableId) ||
FateTable.ID.equals(tableId)) {
return META;
}
return USER;
}
```
However one thing I do not like about the above is thatit has the potential
to drift in the case a new "accumulo.X" table is added.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]