New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Internal: DistributorDirectory should not invoke distributor when reading an existing file #7306
Labels
Comments
mikemccand
added a commit
that referenced
this issue
Aug 19, 2014
…g existing file This was causing too much work e.g. when pulling node stats or when opening a new reader, because the least_used distributor would unnecessarily check free disk space on all path.data entires every time we try to open a file for reading or check its length. Closes #7306 Closes #7323
mikemccand
added a commit
that referenced
this issue
Aug 19, 2014
…g existing file This was causing too much work e.g. when pulling node stats or when opening a new reader, because the least_used distributor would unnecessarily check free disk space on all path.data entires every time we try to open a file for reading or check its length. Closes #7306 Closes #7323
clintongormley
changed the title
Core: DistributorDirectory should not invoke distributor when reading an existing file
Internal: DistributorDirectory should not invoke distributor when reading an existing file
Sep 8, 2014
mikemccand
added a commit
that referenced
this issue
Sep 8, 2014
…g existing file This was causing too much work e.g. when pulling node stats or when opening a new reader, because the least_used distributor would unnecessarily check free disk space on all path.data entires every time we try to open a file for reading or check its length. Closes #7306 Closes #7323
FYI - I relabelled this since it's a bug |
mute
pushed a commit
to mute/elasticsearch
that referenced
this issue
Jul 29, 2015
…g existing file This was causing too much work e.g. when pulling node stats or when opening a new reader, because the least_used distributor would unnecessarily check free disk space on all path.data entires every time we try to open a file for reading or check its length. Closes elastic#7306 Closes elastic#7323
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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?
The text was updated successfully, but these errors were encountered: