keith-turner commented on code in PR #4122:
URL: https://github.com/apache/accumulo/pull/4122#discussion_r1459642995
##########
server/manager/src/main/java/org/apache/accumulo/manager/tableOps/tableImport/PopulateMetadataTable.java:
##########
@@ -131,8 +132,18 @@ public Repo<Manager> call(long tid, Manager manager)
throws Exception {
Text cq;
if (key.getColumnFamily().equals(DataFileColumnFamily.NAME)) {
- final StoredTabletFile oldTabletFile =
StoredTabletFile.of(key.getColumnQualifier());
- String oldName = oldTabletFile.getFileName();
+ StoredTabletFile exportedRef;
+ var dataFileCQ = key.getColumnQualifier().toString();
+ if (tableInfo.exportedVersion == null ||
(tableInfo.exportedVersion < VERSION
+ && StoredTabletFile.fileNeedsConversion(dataFileCQ))) {
Review Comment:
This behavior is very tied to a specific version. I would make that more
explicit as follows with a new constant `VERSION_2`. If in the future if
`VERSION` changes this code will still behave the same w.r.t. the specific
version where the change in behavior happened. It also makes it easier to
follow the code over time and know what specific version we care about in this
if stmt.
```suggestion
if (tableInfo.exportedVersion == null ||
tableInfo.exportedVersion < VERSION_2) {
checkState(!StoredTabletFile.fileNeedsConversion(dataFileCQ));
```
--
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]