-
-
Notifications
You must be signed in to change notification settings - Fork 555
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-21922: Introduce methods to fetch a subset of revisions in XWikiVersioningStoreInterface #2925
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
…iVersioningStoreInterface * Introduce default methods XWikiVersioningStoreInterface.getXWikiDocVersions and XWikiVersioningStoreInterface.getXWikiDocVersionsCount, taking RevisionCriteria as parameter * Introduce implementations for both in XWikiHibernateVersioningStore * Add XWikiDocument.getRevisionsCount and Document.getRevisionsCount * Edit XWikiDocument.getRevisions(RevisionCriteria) to use the new method * Move hibernate queries from XWikiHibernateVersioningStore to VersioningStoreQueryFactory to even out class fan-out complexity
This was referenced Feb 23, 2024
manuelleduc
reviewed
Feb 23, 2024
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Outdated
Show resolved
Hide resolved
manuelleduc
reviewed
Feb 23, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
manuelleduc
reviewed
Feb 23, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
manuelleduc
reviewed
Feb 23, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
manuelleduc
reviewed
Feb 23, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
manuelleduc
reviewed
Feb 23, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiVersioningStoreInterface.java
Outdated
Show resolved
Hide resolved
…iVersioningStoreInterface * Fix minor version filtering * Improve style and documentation
surli
reviewed
Feb 26, 2024
xwiki-platform-core/xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/doc/XWikiDocument.java
Show resolved
Hide resolved
surli
reviewed
Feb 26, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
surli
reviewed
Feb 26, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
surli
reviewed
Feb 26, 2024
...m-oldcore/src/main/java/com/xpn/xwiki/store/hibernate/query/VersioningStoreQueryFactory.java
Show resolved
Hide resolved
surli
reviewed
Feb 26, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiVersioningStoreInterface.java
Show resolved
Hide resolved
surli
added
the
backport stable-15.10.x
Used for automatic backport to 15.10.x branch.
label
Feb 26, 2024
tmortagne
reviewed
Feb 27, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiHibernateVersioningStore.java
Outdated
Show resolved
Hide resolved
tmortagne
reviewed
Feb 27, 2024
.../xwiki-platform-oldcore/src/main/java/com/xpn/xwiki/store/XWikiVersioningStoreInterface.java
Outdated
Show resolved
Hide resolved
…iVersioningStoreInterface * Add new creation method to RevisionCriteriaFactory * Other small improvements
…iVersioningStoreInterface * Add VersioningStoreQueryFactoryTest * Add XWikiVersioninStoreInterfaceTest
…iVersioningStoreInterface * Update @SInCE annotations
Should be good now. |
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.
Jira URL
https://jira.xwiki.org/browse/XWIKI-21922
Changes
Description
XWikiVersioningStoreInterface
:getXWikiDocVersions
andgetXWikiDocVersionsCount
, both taking an instance ofRevisionCriteria
as parameter. They both have a default implementation that work by using the existinggetXWikiDocVersions
and filtering the results.XWikiHibernateVersioningStore
.XWikiDocument.getRevisionsCount
andDocument.getRevisionsCount
to expose the new count method.XWikiDocument.getRevisions(RevisionCriteria)
to use the new fetch method. The existing filtering was used as a basis for the default implementation ofXWikiVersioningStoreInterface.getXWikiDocVersions
.XWikiHibernateVersioningStore
to a newVersioningStoreQueryFactory
class to even out class fan-out complexity.Clarifications
Screenshots & Video
N/A
Executed Tests
A XWiki instance was run with the applied patches and everything was working as expected. A substantial speed-up was noticed in Velocity code using
XWikiDocument.getRevisions
for documents with more than 200k revisions.Expected merging strategy