-
-
Notifications
You must be signed in to change notification settings - Fork 554
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
XWIKI-9046: Renaming a document holding a lot of revisions can lead to an OutOfMemory exception #2926
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
surli
added
the
backport stable-15.10.x
Used for automatic backport to 15.10.x branch.
label
Feb 26, 2024
…o an OutOfMemory exception * Only load last node when updating the document archive
Might be interesting to have such an integration test, a lot of pieces are involved here, and it would be easy to break this use case again. |
That's reasonable, I'll see what I can do. |
…o an OutOfMemory exception * Add a basic test
I added a very basic test for now. |
tmortagne
approved these changes
Mar 19, 2024
surli
added a commit
that referenced
this pull request
May 24, 2024
…nts is moved Revert "XWIKI-9046: Renaming a document holding a lot of revisions can lead to an OutOfMemory exception (#2926)" This reverts commit 8e509b7. The solution provided in this commit wasn't taking into account usecases when the doc wasn't saved in DB yet, e.g. like in case of renaming. Also the solution is not good since we actually never set the archive in doc in case of criteria not all inclusive, and if it had worked it would have been a problem since we'd have kept only latest revision and lost the remaining of the history when saving docs. All in all we need another solution.
surli
added a commit
that referenced
this pull request
May 24, 2024
…nts is moved Revert "XWIKI-9046: Renaming a document holding a lot of revisions can lead to an OutOfMemory exception (#2926)" This reverts commit 8e509b7. The solution provided in this commit wasn't taking into account usecases when the doc wasn't saved in DB yet, e.g. like in case of renaming. Also the solution is not good since we actually never set the archive in doc in case of criteria not all inclusive, and if it had worked it would have been a problem since we'd have kept only latest revision and lost the remaining of the history when saving docs. All in all we need another solution. (cherry picked from commit 03d3ebe)
surli
added a commit
that referenced
this pull request
May 24, 2024
…nts is moved Revert "XWIKI-9046: Renaming a document holding a lot of revisions can lead to an OutOfMemory exception (#2926)" This reverts commit 8e509b7. The solution provided in this commit wasn't taking into account usecases when the doc wasn't saved in DB yet, e.g. like in case of renaming. Also the solution is not good since we actually never set the archive in doc in case of criteria not all inclusive, and if it had worked it would have been a problem since we'd have kept only latest revision and lost the remaining of the history when saving docs. All in all we need another solution. (cherry picked from commit 03d3ebe)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This requires merging #2925 first.
Jira URL
https://jira.xwiki.org/browse/XWIKI-9046
Changes
Description
Clarifications
N/A
Screenshots & Video
N/A
Executed Tests
Renaming a document with around 200k revisions was tested on an instance running this patch and it worked fine. Also, the saving process only took around 150ms instead of 1s without the patch applied (with HSQLDB).
Expected merging strategy