Ignore relative ordering of works on different documents in BackendMock

Description

It turns out that these ordering constraints are making CI fail; see HSEARCH-4164.

The thing is, we don't really care about relative ordering of works on different documents. It has no impact whatsoever on the end result.

And in the case of automatic indexing using a strategy that sends events to a queue, the relative ordering can be changed by the strategy. E.g. if we trigger indexing of document A and B in the same session, we expect this ordering:

  • Create work for doc A

  • Create work for doc B

  • Execute work for doc A

  • Execute work for doc B

But while processing the queue, the background process may end up executing it like this:

  • Create work for doc A

  • Execute work for doc A

  • Create work for doc B

  • Execute work for doc B

And that's fine! Really, we don't care, as long as works on the same document are still executed in order.

So we should re-scope ordering constraints to the document, instead of the index.

Environment

None
Fixed

Assignee

Yoann Rodière

Reporter

Yoann Rodière

Labels

None

Suitable for new contributors

None

Feedback Requested

None

Components

Fix versions

Priority

Major