kbendick opened a new pull request #1489: URL: https://github.com/apache/iceberg/pull/1489
The method BaseMetastoreCatalog#deleteFiles keeps track of deleted files in a Map<String, Boolean> using a Guava MapMaker with weak keys and weak values. We intern the file path represented as a string that is going to be placed into this weak key map, as the Guava MapMaker weak key map uses identity (==) instead of equals. Thus, intern-ing the strings is the only way to ensure that when two possible keys p1 and p2 are placed into the map, where p1.equals(p2), it will be correctly overwritten (i.e. the intern is necessary to force the strings to share the same memory address and thus have identity work as that's what is used). ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
