sodonnel commented on pull request #1549: URL: https://github.com/apache/ozone/pull/1549#issuecomment-724139244
The fact that ContainerCache is static gives some difficult / impossible problems to resolve in any tests which use the mini-Cluster. With a mini-cluster, as there is only 1 ContainerCache, it is shared by all DN instances. If you restart a DN instance, it will reuse the same cached RocksDB instance it put into the cache earlier. In the earlier version of this patch, this caused the DN to fail to startup correctly, as it found open RocksDBs where it did not expect. To fix this, I changed the code slightly. Now it will try to get a new "uncached RocksDB instance" at startup time. If getting that instance throws an exception, then I try to get an instance from the cache. The second scenario should only be seen in the tests. At startup time, the DN ContainerCache must be empty and hence the RocksDBs should never fail to open due to it already being open. @elek Could you have another look at the changes please? ---------------------------------------------------------------- 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]
