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.
WILL BREAK THE UI WITHOUT THE REQUIRED BACKEND CHANGES: opencast/opencast#6461
The events table is sorted by a sort parameter. By default, this is the start date. If there are multiple events with the same start date, the sorting for those is left to the elasticseach index in the backend. Elasticsearch however does not guarantee any ordering. This may result in the order of events changing unexpectedly like in #1102.
This patch aims to solve this by adding a secondary sort parameter to the events query. The primary parameter still takes priority. For the secondary parameter,
uid
was chosen as it is the only field guaranteed to be unique.More sorting parameters can lead to increased query times. If someone with an Opencast with many events could test the impact of these changes on the
events.json
request times, that would be great.How to test this
Requires an Opencast with the PR opencast/opencast#6461 installed.