-
Notifications
You must be signed in to change notification settings - Fork 414
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
OAK-11182: Create and test general mechanism for creating MongoDocumentStore fullGC garbage for testing #1805
base: trunk
Are you sure you want to change the base?
Conversation
shodaaan
commented
Oct 17, 2024
- created GenerateFullGCCommand oak-run class with methods for generating garbage of type GAP_ORPHANS and EMPTY_PROPERTIES. All garbage is generated under a specific main node. Also created a cleanup method for deleting all generated garbage
- added call to GenerateFullGCCommand to AvailableModes with specific oak-run input variable
- created GenerateFullGCCommandTest class with unit test methods for generating and cleaning up garbage
- made VersionGarbageCollector.fullGCMode public, so it can be used Command class
…gment has zero length (apache#1427) * OAK-10771 - Log if evicted segment has length zero. * OAK-10771 - Add diskCacheSize stats * OAK-10771 - Record cache size and change --------- Co-authored-by: Axel Hanikel <ahanikel@adobe.com>
…e/deleteMany to make it compatible with both mongo & mongosh
…lters in job summary (apache#1478)
…ache#1466) * OAK-10811: (oak-search-elastic) reduce contention in IndexTracker * OAK-10811: ElasticIndexInfoProvider uses node api to get :status info * OAK-10811: rolled back unneeded change
* OAK-10675: add service principal support in oak-blob-cloud-azure * OAK-10675: use user delegation key signed sas for service principal and add license to new files * OAK-10675: some self review changes * OAK-10675: set null blob headers as empty string * OAK-10675: update pom to resolve package dependency * OAK-10675: add import packages to resolve bundle * OAK-10770: embed runtime dependencies of azure identity in oak-segment-azure * OAK-10770: remove unused imports, refactor dependencies * OAK-10770: add imports, refactor dependencies * OAK-10675: fix runtime dependency issues, code review
…local names containing '{' or '}'. (apache#1285) Fixed issue and added test case. Co-authored-by: Julian Reschke <reschke@apache.org>
Done --------- Co-authored-by: Julian Sedding <jsedding@apache.org>
* OAK-10780: add azure access token refresh logic * OAK-10780: modify log statement * OAK-10780: modify log statement * OAK-10780: reduce token refresh interval
…E in checkpoints (apache#1487)
…7.1 (apache#1486)"" This reverts commit a9d0c1c.
…anded names (apache#1488) * OAK-10621: o.a.j.o.namepath.JcrPathParser does not accept indexed expanded names. Fixed, added unit tests.
…n an indexing phase fails. (apache#1481)
* OAK-10675: add service principal support in oak-blob-cloud-azure * OAK-10675: use user delegation key signed sas for service principal and add license to new files * OAK-10675: some self review changes * OAK-10675: set null blob headers as empty string * OAK-10675: update pom to resolve package dependency * OAK-10675: add import packages to resolve bundle * OAK-10770: embed runtime dependencies of azure identity in oak-segment-azure * OAK-10770: remove unused imports, refactor dependencies * OAK-10770: add imports, refactor dependencies * OAK-10675: fix runtime dependency issues, code review * OAK-10781: add access token refresh mechanism * close executor * reduce token refresh delauy to 1 minute * retrigger build
…#1454) Co-authored-by: Stefan Egli <stefanegli@apache.org> Co-authored-by: Rishabh Kumar <diam@adobe.com> Co-authored-by: Jose Cordero <corderob@adobe.com> Co-authored-by: Daniel Iancu <iancu@adobe.com> Full details in branch: DetailedGC/OAK-10199
…p narrow down where time is spent
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateFullGCCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateFullGCCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateFullGCCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateFullGCCommand.java
Outdated
Show resolved
Hide resolved
…generated garbage nodes to shorter names - made executor a class level variable and added close method for it - renamed files to include "Garbage" - other small suggested changes
…arbageOptionType parameter passed to the generateGarbage Command - reverted change in VersionGarbageCollector.java
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/GenerateGarbageHelper.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/GenerateGarbageHelper.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
…ommand, which allow for generating gap orphans up to 15 levels deep and also allows for deleting nodes in their hierarchy up to the specified orphansLevelGap level - separated the garbage generation code for EMPTY_PROPS / GAP_ORPHANS into 2 separate methods - adjusted existing unit test methods in GenerateGarbageCommandTest and added new ones for the new level / gap parameters - other small changes from the PR review
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.
Added a few more points.
One general question is : as this command is clearly a test command not to be used against a production environment : how could that be emphasized. For example: we could add an explicit: "are you really sure you want to generate test garbage against ...". That would make it clear that the target repository is going to be written to. Wdyt?
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/GenerateGarbageHelper.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/AvailableModes.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/GenerateGarbageCommand.java
Outdated
Show resolved
Hide resolved
…der the garbage root path - added additional unit test for cleanup of empty properties garbage - used path utility methods where possible - added some method descriptions where relevant - renamed constants and updated comments and strings to remove "fullGC" from strings
I resolved all of the points, thank you for the suggestions. Regarding the explicit check, I don't think this is necessary because oak-run is a tool that by design makes important / deep changes in the MongoDB it is run on, so users should always be careful and know the exact consequences of the commands they run. |
oak-run/src/main/java/org/apache/jackrabbit/oak/run/AvailableModes.java
Outdated
Show resolved
Hide resolved
Fair enough. Two unrelated additional comments:
|
- added documentNodeStore.dispose() calls to CreateGarbageCommand.java
I added documentNodeStore.dispose() calls to CreateGarbageCommand. Thank you for the suggestion The root path where garbage is generated (/tmp/oak-run-generated-test-garbage) is specified in the USAGE string of CreateGarbageCommand, so users will know what the path is where garbage is generated. |
- added disabled lease check mode setting to DocumentNodeStoreBuilder in GenerateGarbageCommand - added some more output messages to make the functionality clearer when running oak-run
I added proper disposal of DocumentNodeStore for both createGarbage and cleanupGarbage commands. Tested oak-run with repeated runs and disposal works correctly. I also added some println messages with the base path of the generated garbage, as well as the paths of the documents deleted by the "clean" sub-command. |
oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/document/CreateGarbageCommandTest.java
Outdated
Show resolved
Hide resolved
oak-run/src/test/java/org/apache/jackrabbit/oak/plugins/document/CreateGarbageCommandTest.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/GenerateGarbageHelper.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
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.
I would replace the usage of generate
with create
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
- removed Closeable implementation of CreateGarbageCommand - some minor renames
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.
Had troubles getting the continuous mode running and I believe it's broken because of the new closer logic closing it early.
(other than that added a few detail remarks as well)
oak-store-document/src/test/java/org/apache/jackrabbit/oak/plugins/document/FullGCHelper.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/plugins/document/CreateGarbageHelper.java
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
oak-run/src/main/java/org/apache/jackrabbit/oak/run/CreateGarbageCommand.java
Outdated
Show resolved
Hide resolved
...cument/src/main/java/org/apache/jackrabbit/oak/plugins/document/VersionGarbageCollector.java
Outdated
Show resolved
Hide resolved
…d.java in order to cover all cases, including continuous garbage generation - updated resource disposal in unit tests to account for changes - other minor changes / renames
Tested oak-run with all modes (including continuous generation), everything works fine now. |
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.
+1 lgtm, started the jenkins run, would suggest to go ahead with merge unless we find a regression (unlikely), and then we can iterate from there
squash merge obviously! |