Skip to content
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

Don't update events in index twice when changing series metadata #3010

Merged

Conversation

KatrinIhler
Copy link
Member

Right now, the update of events in the index is done twice when triggered by a series metadata change:
Once directly in the series service after updating the series in the index, and once asynchronously by the AssetManagerUpdatedEventHandler when doing a snapshot.
The first approach is faster, but will only update the index, not the actual event data. So if something goes wrong during the snapshot, this will lead to inconsistency. It's also a bit of a code smell in my opinion to do this twice.
So I'd like to remove this, even though it might result in slower performance, because the index should represent the actual state of the data, not the state it will hopefully soon be in. But I'm open to criticism here.

Right now, the update of events in the index is done twice when
triggered by a series metadata change: Once directly in the series
service when updating the series in the index, and once asynchronously
by the AssetManagerUpdatedEventHandler when doing a snapshot. The first
approach is faster, but will only update the index, not the actual event
data. So if something goes wrong during the snapshot, this will lead to
inconsistency. It's also a bit of a code smell in my opinion to do this
twice. So I'd like to remove this, even though it might result in slower
performance, because the index should represent the actual state of the
data, not the state it will hopefully soon be in. But I'm open to
criticism.
@KatrinIhler KatrinIhler added enhancement elan e.V. Pull requests originating from elan e.V. java Pull requests that update Java code labels Sep 22, 2021
@github-actions
Copy link
Contributor

This pull request has conflicts ☹
Please resolve those so we can review the pull request.
Thanks.

@gregorydlogan gregorydlogan self-assigned this Nov 12, 2021
@gregorydlogan gregorydlogan merged commit bf5e9fe into opencast:develop Nov 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
elan e.V. Pull requests originating from elan e.V. enhancement has-conflicts java Pull requests that update Java code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants