Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Internal: DistributorDirectory should not invoke distributor when reading an existing file #7306
I noticed some hot threads doing this while computing node stats:
Which is odd because why would we invoke the least_used distributor when checking fileLength (or opening for read, in other cases) an already-existing file? Seems like we should only check this when writing a new file.
Looking at line 176 of 1.x of DistributorDirectory.java, it looks like we do this to simplify concurrency (so we can use CHM.putIfAbsent), but I think we should fix this code to only invoke the distributor when it's writing a new file?