cshannon commented on code in PR #3417:
URL: https://github.com/apache/accumulo/pull/3417#discussion_r1206733882


##########
server/base/src/main/java/org/apache/accumulo/server/util/ManagerMetadataUtil.java:
##########
@@ -199,10 +199,10 @@ public static void replaceDatafiles(ServerContext 
context, KeyExtent extent,
     TabletMutator tablet = context.getAmple().mutateTablet(extent);
 
     datafilesToDelete.forEach(tablet::deleteFile);
-    scanFiles.forEach(tablet::putScan);
+    
scanFiles.stream().map(StoredTabletFile::getTabletFile).forEach(tablet::putScan);
 
     if (path.isPresent()) {
-      tablet.putFile(path.orElseThrow(), size);
+      tablet.putFile(path.orElseThrow().getTabletFile(), size);

Review Comment:
   So that makes sense for updates, but I'm a bit confused as that is not how 
it works today so I'm wondering what would happen if we change this. 
   
   In the current code we always insert a normalized path in the putFile() 
method. So even the cases where the instance type is StoredTabletFile, like 
[here](https://github.com/apache/accumulo/blob/0017fd8949cc1bc7253b8e90313d4fd1b71e2241/server/base/src/main/java/org/apache/accumulo/server/util/ManagerMetadataUtil.java#L205),
 the inserted path is normalized because we then 
[call](https://github.com/apache/accumulo/blob/0017fd8949cc1bc7253b8e90313d4fd1b71e2241/server/base/src/main/java/org/apache/accumulo/server/metadata/TabletMutatorBase.java#L86)
 getMetaInsertText() which will use the normalized string and not the 
metadataEntry string.



-- 
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]

Reply via email to