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

Versions of volume data should be created at "transaction" points #6495

Closed
philippotto opened this issue Sep 26, 2022 · 4 comments · Fixed by #7290
Closed

Versions of volume data should be created at "transaction" points #6495

philippotto opened this issue Sep 26, 2022 · 4 comments · Fixed by #7290

Comments

@philippotto
Copy link
Member

philippotto commented Sep 26, 2022

Currently, editing volume data will create new versions where each version consists of at most 32 changed buckets (see COMPRESSING_BATCH_SIZE). However, this means that reverting to an older version might very well restore a state where chunk borders are visible since the version was created right in the middle of saving.
Ideally, the saving mechanism should use a transaction logic (similar to how it's done for skeletons) so that each version is a consistent tracing state.

An additional benefit of ditching the 32 limit is that we reduce the amount of versions being created (one large brush stroke can already cover much more than 32 buckets).

/edit: Another problem caused by this is that version conflicts (e.g., user B saved something while user A was saving larger changes) will result in missing data.

@philippotto philippotto changed the title Versions of volume data be created at "transaction" points Versions of volume data should be created at "transaction" points Sep 28, 2022
@philippotto
Copy link
Member Author

@fm3 Are the transaction{Ids,groupIndex,groupCount} persisted or is it only ephemeral to ensure that no "half transactions" are stored? @daniel-wer and I noticed that the version history view doesn't make use of the transaction concept currently. If the properties are stored, we could use them to show semantic versions.

This would only help for skeleton tracings, though, since the front-end doesn't really make use of transaction groups for volume tracings.

@fm3
Copy link
Member

fm3 commented Oct 26, 2022

The transaction grouping is not currently stored in the db, it is only used to hold back its update groups until the transaction is complete, then they are all inserted into the db.
We can of course add more optional fields to the stored update actions, encoding the transaction ids. But as you say, for volume tracings we would also have to change the frontend

@philippotto
Copy link
Member Author

Just for the record: We decided to establish a 1:1 relation between transactions and versions (see #7290). That way, we don't need to store additional properties, such as the transactionGroupIndex.

@fm3 fm3 closed this as completed in #7290 Sep 7, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants