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

Race condition in timeseries creation #57

Open
Lun4m opened this issue Jan 8, 2025 · 4 comments · May be fixed by #61
Open

Race condition in timeseries creation #57

Lun4m opened this issue Jan 8, 2025 · 4 comments · May be fixed by #61
Labels
bug Something isn't working

Comments

@Lun4m
Copy link
Collaborator

Lun4m commented Jan 8, 2025

If a timeseries is not yet present in LARD, two threads separately ingesting data for that timeseries can create two different timeseries IDs. Discovered from #46.

@Lun4m Lun4m added the bug Something isn't working label Jan 8, 2025
@intarga
Copy link
Member

intarga commented Jan 8, 2025

Perhaps a unique constraint on the native labels could solve this?

@Lun4m
Copy link
Collaborator Author

Lun4m commented Jan 8, 2025

On the MET labels? In principle, that's what makes the most sense to me, but can we have a deactivated and an active timeseries sharing the same label? Also, this would disallow the current approach we have taken with migrations and ts reconciliation?

Edit: another problem is that some param codes don't have an associated param id, so it might not work for those. I'm still not sure how to handle them properly.

@intarga
Copy link
Member

intarga commented Jan 8, 2025

I meant only on the native labels (i.e labels.obsinn). We need duplicates on the met label for the reconciliation strategy, but each of those should have different native labels

@Lun4m
Copy link
Collaborator Author

Lun4m commented Jan 8, 2025

Ah yeah, we are also inserting into that table, that should work 👌

@Lun4m Lun4m linked a pull request Feb 3, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants