Skip to content

WIP Reserve annotation ids via postgres, add collaborationMode#9297

Draft
fm3 wants to merge 202 commits intomasterfrom
m4-reserve-ids
Draft

WIP Reserve annotation ids via postgres, add collaborationMode#9297
fm3 wants to merge 202 commits intomasterfrom
m4-reserve-ids

Conversation

@fm3
Copy link
Member

@fm3 fm3 commented Feb 11, 2026

URL of deployed dev instance (used for testing):

  • https://___.webknossos.xyz

Steps to test:

  • abc

TODOs:

  • backend

    • collaborationMode
    • reserveIds + reservedIds routes
    • schema
    • scan in tracingstore (caveat: segment ids in fallback layer case not supported yet)
    • reserve queries for postgres
    • free ids when annotation colalborationMode is switched back away from Concurrent
    • foreign key constraints
    • mutex
    • evolutions
    • test
  • frontend

    • collaborationMode
    • reserve ids

Issues:

  • fixes #

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

  • Added changelog entry (create a $PR_NUMBER.md file in unreleased_changes or use ./tools/create-changelog-entry.py)
  • Added migration guide entry if applicable (edit the same file as for the changelog)
  • Updated documentation if applicable
  • Adapted wk-libs python client if relevant API parts change
  • Removed dev-only changes like prints and application.conf edits
  • Considered common edge cases
  • Needs datastore update after deployment

philippotto and others added 30 commits November 25, 2025 16:03
…freading saga to finish (also check segment existence)
@fm3
Copy link
Member Author

fm3 commented Feb 12, 2026

@philippotto The backend functionality is done, but I could only do rudimentary tests without a corresponding frontend. Summary:

  • changed the othersMayEdit property to collaborationMode, update route is api/annotations/:typ/:id/collaborationMode.
  • new route GET api/annotations/:id/reservedIds?tracingId=x&domain=y (domains are Segment, SegmentGroup, Tree, Node, TreeGroup, BoundingBox)
  • new route POST api/annotations/:id/reserveIds) expects json body:
    domain: AnnotationIdDomain,
    tracingId: String,
    numberOfIdsToReserve: Int,
    idsToRelease: Array[Long]

returns json array of newly reserved ids.

Note that the segment domain is only partially supported. It will fail for annotations with fallback segmentation layer, as discussed previously.

CI currently fails because the frontend types don’t yet understand collaborationMode.

Let me know if you need anything else!

Base automatically changed from live-m4 to master March 5, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants