Skip to content

Conversation

tmortagne
Copy link
Member

@michitux noticed a problem in how the ordering of missing entries was handled in the diff iterator from #4298, so here is an attempt to fix that

Jira URL

https://jira.xwiki.org/browse/XWIKI-15166

Changes

Description

Since we need the docId to properly compare entries, I had to change what the iterators expose to also provide the docId.

Clarifications

DocumentIteratorEntry#wiki:
I could have used the wiki reference from the DocumentReference, but I wanted to be able to sort with only the DocumentIteratorEntry to make the code simpler.

Executed Tests

Mainly updated already existing tests.

Expected merging strategy

  • Prefers squash: Yes
  • Backport on branches: no backport

… large database

* missing proper ordering in the diff iterator when there are holes
Copy link
Contributor

@michitux michitux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me apart from the missing Solr field. Also, I fear the integration test needs to be adjusted as it relies on some of the internal APIs.

@tmortagne
Copy link
Member Author

tmortagne commented Sep 3, 2025

I fear the integration test needs to be adjusted

It was a bit of a pain to build integration tests because of the state of nexus-snapshot yesterday.

I should be OK now (it's passing at least), but I could use your input on the change I made to make it pass (the main one being that we don't compute any comparison anymore in #toList for the diff iterator, since we don't have the docId).

@tmortagne tmortagne marked this pull request as ready for review September 5, 2025 09:22
@tmortagne tmortagne merged commit fb9c49d into master Sep 5, 2025
2 checks passed
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.

2 participants