-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Add file cache restore logic #6538
Conversation
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
Outdated
Show resolved
Hide resolved
if (subPathFile.isFile()) { | ||
fileCache.put( | ||
subPathFile.toPath().toRealPath(), | ||
new FileCachedIndexInput.ClosedIndexInput(subPathFile.length()) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is so gross, but I understand why you're doing it. I think we should be caching a pointer to a chunk on disk instead of an InputIndex (we can create an IndexInput for the file chunk on demand when it is needed) but that is a bigger cache refactoring discussion.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we create an issue to track this?
cc4368c
to
8b8d5c4
Compare
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
Outdated
Show resolved
Hide resolved
server/src/test/java/org/opensearch/index/store/remote/filecache/FileCacheTests.java
Outdated
Show resolved
Hide resolved
8b8d5c4
to
97592fc
Compare
97592fc
to
cd5c4f6
Compare
Gradle Check (Jenkins) Run Completed with:
|
server/src/main/java/org/opensearch/index/store/remote/filecache/FileCache.java
Outdated
Show resolved
Hide resolved
Gradle Check (Jenkins) Run Completed with:
|
cd5c4f6
to
0ac19cc
Compare
Gradle Check (Jenkins) Run Completed with:
|
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## main #6538 +/- ##
============================================
+ Coverage 70.77% 70.80% +0.03%
+ Complexity 59125 59106 -19
============================================
Files 4804 4804
Lines 283098 283128 +30
Branches 40813 40813
============================================
+ Hits 200372 200481 +109
+ Misses 66269 66206 -63
+ Partials 16457 16441 -16
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
} | ||
|
||
NodesStatsResponse postRestoreStats = client().admin().cluster().nodesStats(new NodesStatsRequest().all()).actionGet(); | ||
java.util.Map<String, NodeStats> preRestoreStatsMap = preRestoreStats.getNodesMap(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nitpick, but you can you change the import on line 27 use java.util.Map
so that you don't have to do the fully qualified thing here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated.
0ac19cc
to
c25a4d9
Compare
Signed-off-by: Kunal Kotwani <[email protected]>
c25a4d9
to
c034a88
Compare
Gradle Check (Jenkins) Run Completed with:
|
Gradle Check (Jenkins) Run Completed with:
|
Signed-off-by: Kunal Kotwani <[email protected]> (cherry picked from commit 16535b9) Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
(cherry picked from commit 16535b9) Signed-off-by: Kunal Kotwani <[email protected]> Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com> Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Signed-off-by: Kunal Kotwani <[email protected]> Signed-off-by: Mingshi Liu <[email protected]>
Description
Issues Resolved
Check List
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.