Skip to content
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

fix: 17219: WARN EXCEPTION "virtual-map: cache-cleaner StandardFuture: Future has already been cancelled" #17475

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

artemananiev
Copy link
Member

Fixes: #17219
Signed-off-by: Artem Ananev [email protected]

…: Future has already been cancelled"

Signed-off-by: Artem Ananev <[email protected]>
@artemananiev artemananiev added this to the v0.59 milestone Jan 22, 2025
@artemananiev artemananiev self-assigned this Jan 22, 2025
@artemananiev artemananiev requested review from a team as code owners January 22, 2025 01:47
Copy link

codecov bot commented Jan 22, 2025

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

Project coverage is 68.96%. Comparing base (c5e7dc1) to head (2812870).
Report is 5 commits behind head on main.

Files with missing lines Patch % Lines
...lds/virtualmap/internal/cache/ConcurrentArray.java 40.00% 3 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@             Coverage Diff              @@
##               main   #17475      +/-   ##
============================================
- Coverage     69.01%   68.96%   -0.05%     
- Complexity    22724    22761      +37     
============================================
  Files          2615     2619       +4     
  Lines         98026    98269     +243     
  Branches      10162    10185      +23     
============================================
+ Hits          67649    67774     +125     
- Misses        26559    26663     +104     
- Partials       3818     3832      +14     
Files with missing lines Coverage Δ
...ds/virtualmap/internal/cache/VirtualNodeCache.java 76.81% <100.00%> (-0.09%) ⬇️
...lds/virtualmap/internal/cache/ConcurrentArray.java 77.60% <40.00%> (-1.09%) ⬇️

... and 35 files with indirect coverage changes

Impacted file tree graph

Copy link

codacy-production bot commented Jan 22, 2025

Coverage summary from Codacy

See diff coverage on Codacy

Coverage variation Diff coverage
-0.03% (target: -1.00%) 78.57%
Coverage variation details
Coverable lines Covered lines Coverage
Common ancestor commit (c5e7dc1) 97809 71316 72.91%
Head commit (2812870) 97992 (+183) 71422 (+106) 72.89% (-0.03%)

Coverage variation is the difference between the coverage for the head and common ancestor commits of the pull request branch: <coverage of head commit> - <coverage of common ancestor commit>

Diff coverage details
Coverable lines Covered lines Diff coverage
Pull request (#17475) 14 11 78.57%

Diff coverage is the percentage of lines that are covered by tests out of the coverable lines that the pull request added or modified: <covered lines added or modified>/<coverable lines added or modified> * 100%

See your quality gate settings    Change summary preferences

Codacy stopped sending the deprecated coverage status on June 5th, 2024. Learn more

@@ -1434,11 +1434,11 @@ private Mutation<K, VirtualLeafRecord<K, V>> mutate(
* @param <V>
* The value type referenced by the mutation list
*/
private static <K, V> void purge(
private static <K, V> StandardFuture<Void> purge(
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You change the return value type but never use it.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a leftover from my first approach to this issue. I was going to use this StandardFuture and call getAndRethrow() on it in release(), but gave up with this idea. array.parallelTraverse() returns a StandardFuture anyway

dirtyLeafPaths = null;
dirtyHashes = null;
});
purge(dirtyLeaves, keyToDirtyLeafIndex, virtualMapConfig);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is performance impact of calling purge() synchronously negligible? What is the benefit of the change?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The only thing purge() does is it calls array.parallelTraverse(), which runs everything in the node cache cleaning pool. There is no need to run purge() itself in the same pool, it just complicates the code.

…in ConcurrentArray.parallelTraverse()

Signed-off-by: Artem Ananev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

WARN EXCEPTION "virtual-map: cache-cleaner StandardFuture: Future has already been cancelled"
2 participants