XWIKI-22613: Updating the history can take a very long time when there are a lot of objects #3788
+1,599
−314
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.
Jira URL
https://jira.xwiki.org/browse/XWIKI-22613: Updating the history can take a very long time when there are a lot of objects
https://jira.xwiki.org/browse/XWIKI-22752: Allows indicating in the Hibernate hbm configuration files that an entity should be compressed
https://jira.xwiki.org/browse/XWIKI-22747: Introduce the concept of XWiki Hibernate adapter
Changes
Description
The main goal of this change is to stop storing diff in the document history table.
The "stop storing diff" part is easy, but it implies trying to optimize the RCS table to try to reduce its size as much as possible by compressing it. Since the way to do this is not handled by Hibernate and quite different depending on the database engine, I also used this opportunity to improve how we deal with the difference between database engine with a new HibernateAdapater concept.
Clarifications
See the following for more details and discussion around each subject:
HibernateAdapter
API: https://forum.xwiki.org/t/new-xwiki-api-to-extend-the-hibernate-dialects/16193Executed Tests
TODO:
The main goal of this pull request is improving document save performances, which is not something which is easy to accurately test in an integration test.
But it could still be interesting to add tests for the following:
Expected merging strategy