Skip to content

Attempt at reducing GC memory usage when gathering candidates#6449

Merged
dlmarion merged 1 commit into
apache:2.1from
dlmarion:gc-cand-filter
Jun 30, 2026
Merged

Attempt at reducing GC memory usage when gathering candidates#6449
dlmarion merged 1 commit into
apache:2.1from
dlmarion:gc-cand-filter

Conversation

@dlmarion

Copy link
Copy Markdown
Contributor

This change pushes the Value filtering to the server-side using an iterator instead of using a filter in a Stream, and sets an initial size on the candidate ArrayList to try and reduce resize operations.

This change pushes the Value filtering to the server-side
using an iterator instead of using a filter in a Stream, and
sets an initial size on the candidate ArrayList to try and
reduce resize operations.
@dlmarion dlmarion added this to the 2.1.5 milestone Jun 29, 2026
@dlmarion dlmarion self-assigned this Jun 29, 2026
Comment thread server/gc/src/main/java/org/apache/accumulo/gc/GCRun.java
}
scanner.setRange(range);
return scanner.stream().filter(entry -> entry.getValue().equals(SkewedKeyValue.NAME))
scanner.addScanIterator(new IteratorSetting(25, "gcCandidate", GcCandidateFilter.class));

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Are we keeping track of the system iterator priorities being used?

I see the default value of the versioning iterator being set at 20, but that's just a hardcoded value.

props.put(Property.TABLE_ITERATOR_PREFIX + iterScope.name() + ".vers",
"20," + VersioningIterator.class.getName());

Wondering if that initial value of 20 should be refactored into a system constant of DEFAULT_ITERATOR_PRIORITY.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Are we keeping track of the system iterator priorities being used?

I don't think there is a constant in 2.1, there might be a constant in 4.0. I can look for that.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I'm not seeing a constant. I see a literal 20 being used in main in IteratorConfigUtil.getInitialTableIteratorSettings

@ddanielr ddanielr left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes make sense. GarbageCollectorIT still passes.

@dlmarion dlmarion merged commit d6ef7c8 into apache:2.1 Jun 30, 2026
9 checks passed
@dlmarion dlmarion deleted the gc-cand-filter branch June 30, 2026 11:24
@dlmarion dlmarion modified the milestones: 2.1.5, 2.1.6 Jul 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants