Commit ede8b6e
committed
Enforce event ordering
**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 *many* events could test
the impact of these changes
that would be great.1 parent fe113d7 commit ede8b6e
1 file changed
Lines changed: 7 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
232 | 232 | | |
233 | 233 | | |
234 | 234 | | |
| 235 | + | |
| 236 | + | |
| 237 | + | |
| 238 | + | |
| 239 | + | |
| 240 | + | |
| 241 | + | |
235 | 242 | | |
236 | 243 | | |
237 | 244 | | |
| |||
0 commit comments