Skip to content

OAK-11433 : added OSGi config for setting max revision age for full gc#2032

Merged
rishabhdaim merged 2 commits intotrunkfrom
OAK-11433
Jan 31, 2025
Merged

OAK-11433 : added OSGi config for setting max revision age for full gc#2032
rishabhdaim merged 2 commits intotrunkfrom
OAK-11433

Conversation

@rishabhdaim
Copy link
Contributor

No description provided.

@github-actions
Copy link

Commit-Check ✔️

Map<String, Object> props = jobPropertiesFor(RevisionGCJob.class);
props.put("scheduler.expression", expr);
long versionGcMaxAgeInSecs = config.versionGcMaxAgeInSecs();
long fullGcMaxAgeInSecs = config.fullGcMaxAgeInSecs();
Copy link
Contributor

Choose a reason for hiding this comment

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

That ist never used.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

addressed in 4011316

@rishabhdaim rishabhdaim requested a review from mbaedke January 29, 2025 13:16
Copy link
Contributor

@reschke reschke left a comment

Choose a reason for hiding this comment

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

(only nitpicking)

private final boolean isFullGCDryRun;
private final boolean embeddedVerification;
private final double fullGCDelayFactor;
private long fullGcMaxAgeInMillis;
Copy link
Contributor

Choose a reason for hiding this comment

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

can this be "final" for consistency?

Copy link
Contributor Author

@rishabhdaim rishabhdaim Jan 29, 2025

Choose a reason for hiding this comment

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

We are setting this in setFullGcMaxAge(), so it can't be made final.

gc.setFullGcMaxAge(maxRevisionAge, unit); // set full gc max age
final VersionGarbageCollector.VersionGCStats stats = gc.gc(maxRevisionAge, unit);
if (stats.skippedFullGCDocsCount != 0) {
(new Exception("here: " + stats.skippedFullGCDocsCount)).printStackTrace(System.out);
Copy link
Contributor

Choose a reason for hiding this comment

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

stdout?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

this has been added to help in printing the error to console in case of failures while running test cases.

@rishabhdaim rishabhdaim merged commit 32e9de1 into trunk Jan 31, 2025
2 of 4 checks passed
@rishabhdaim rishabhdaim deleted the OAK-11433 branch January 31, 2025 04:00
andreeastroe96 pushed a commit to andreeastroe96/jackrabbit-oak that referenced this pull request Feb 25, 2025
apache#2032)

* OAK-11433 : added OSGi config for setting max revision age for full gc

* OAK-11433 : removed un-used var

---------

Co-authored-by: Rishabh Kumar <diam@adobe.com>
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.

4 participants