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

Fix race condition which could disable saving #6914

Merged
merged 5 commits into from
Mar 13, 2023

Conversation

philippotto
Copy link
Member

@philippotto philippotto commented Mar 13, 2023

This fixes a race condition which would affect saving when annotation-sharing was activated. Especially on slow computers, this could lead to a faulty initialization which would mean that nothing was saved.

URL of deployed dev instance (used for testing):

Steps to test:

  • the PR adds a sleep to provoke the original bug (without the fix the bug was reliably happening)
  • Create an annotation and enable others-may-edit
  • reload the annotation and add a tree
  • save and reload -> tree should be there

Issues:


(Please delete unneeded items, merge only when none are left open)

  • Updated changelog
  • Removed dev-only changes like prints and application.conf edits

@philippotto philippotto self-assigned this Mar 13, 2023
@@ -249,6 +250,7 @@ export function* acquireAnnotationMutexMaybe(): Saga<void> {
while (shallTryAcquireMutex) {
if (isInitialRequest) {
yield* put(setAnnotationAllowUpdateAction(false));
yield* call(sleep, 5000);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

revert 37692e7 before merging.

Copy link
Member

@daniel-wer daniel-wer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, I did some monkey testing and couldn't provoke any errors or unsaved data.

CHANGELOG.unreleased.md Outdated Show resolved Hide resolved
@philippotto philippotto enabled auto-merge (squash) March 13, 2023 15:51
@philippotto philippotto merged commit 78466ee into master Mar 13, 2023
@philippotto philippotto deleted the fix-saving-race-condition branch March 13, 2023 16:08
@philippotto philippotto mentioned this pull request Mar 14, 2023
hotzenklotz added a commit that referenced this pull request Mar 14, 2023
…m_members

* 'master' of github.com:scalableminds/webknossos:
  Release 23.03.1 (#6917)
  Redesign Welcome UI (#6904)
  Fix race condition which could disable saving (#6914)
hotzenklotz added a commit that referenced this pull request Mar 20, 2023
…pdown-menu

* 'master' of github.com:scalableminds/webknossos:
  Fix download button for annotations when tiff export is disabled (#6931)
  Update PULL_REQUEST_TEMPLATE.md
  Prepare multi modality support (#6748)
  Improvements for terms-of-services modal (#6930)
  Fix creating task types with preferred mode (#6928)
  Fix styling for login pages for dark mode users (#6916)
  Added members to admin team page (#6915)
  Release 23.03.1 (#6917)
  Redesign Welcome UI (#6904)
  Fix race condition which could disable saving (#6914)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants