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
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions CHANGELOG.unreleased.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
- Fixed a bug where merging multiple volume annotations would result in inconsistent segment lists. [#6882](https://github.com/scalableminds/webknossos/pull/6882)
- Fixed a bug where uploading multiple annotations with volume layers at once would fail. [#6882](https://github.com/scalableminds/webknossos/pull/6882)
- Fixed a bug where dates were formatted incorrectly in Voxelytics reports. [#6908](https://github.com/scalableminds/webknossos/pull/6908)
- Fixed a rare bug which could cause an incorrectly initialized annotation so that changes were not changed in the current session. [#6914](https://github.com/scalableminds/webknossos/pull/6914)
philippotto marked this conversation as resolved.
Show resolved Hide resolved

### Removed

Expand Down
2 changes: 2 additions & 0 deletions frontend/javascripts/oxalis/model/sagas/annotation_saga.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import {
setBlockedByUserAction,
type SetOthersMayEditForAnnotationAction,
} from "oxalis/model/actions/annotation_actions";
import { sleep } from "libs/utils";
import type { EditableAnnotation } from "admin/admin_rest_api";
import {
editAnnotation,
Expand Down Expand Up @@ -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.

}
try {
const { canEdit, blockedByUser } = yield* retry(
Expand Down
2 changes: 1 addition & 1 deletion frontend/javascripts/oxalis/model/sagas/save_saga.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ export function* setupSavingForTracingType(
const allowUpdate = yield* select(
(state) => state.tracing.restrictions.allowUpdate && state.tracing.restrictions.allowSave,
);
if (!allowUpdate) return;
if (!allowUpdate) continue;
const tracing = (yield* select((state) => selectTracing(state, saveQueueType, tracingId))) as
| VolumeTracing
| SkeletonTracing;
Expand Down