Skip to content
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-22613: Updating the history can take a very long time when there are a lot of objects #3788

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tmortagne
Copy link
Member

@tmortagne tmortagne commented Jan 3, 2025

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:

Executed Tests

  • XWikiDocumentArchiveTest now contains several unit tests checking both the new (always full patch) and old behavior (full every 5 versions)

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:

  • do the tables have the expected right row format in MySQL/MariaDB ?
  • do the tables have the right COMPRESS status in Oracle ?

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches: none (too dangerous, at worst everything this change is automating can be done by hand in older versions)

@tmortagne tmortagne marked this pull request as draft January 3, 2025 15:29
@tmortagne tmortagne self-assigned this Jan 8, 2025
@tmortagne tmortagne force-pushed the feature-deploy-nodiffrcs branch 2 times, most recently from e6629fe to 4e62720 Compare January 10, 2025 10:40
@tmortagne tmortagne marked this pull request as ready for review January 10, 2025 10:42
…e are a lot of objects

XWIKI-22752: Allows indicating in the Hibernate hbm configuration files that an entity should be compressed
XWIKI-22747: Introduce the concept of XWiki Hibernate adapter
@tmortagne tmortagne force-pushed the feature-deploy-nodiffrcs branch from 4e62720 to c6458ae Compare January 10, 2025 10:48
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.

1 participant