Skip to content

Commit 2d6943d

Browse files
frcrothfm3
andauthored
Return 500 on missing buckets in fallback layer (#8853)
### URL of deployed dev instance (used for testing): - https://___.webknossos.xyz ### Steps to test: - Add _ <- Fox.failure("test") to applyAgglomerate in AgglomerateService - See 500 in zarr streaming response for a volume layer that has an applied agglomerate. The issue mentions: "I would expect the MISSING_BUCKETS header to be set and zarr streaming to return errors." So should the MISSING_BUCKETS header also be added to the zarr streaming response? ### TODOs: - [ ] ... ### Issues: - fixes #8667 ------ (Please delete unneeded items, merge only when none are left open) - [x] Added changelog entry (create a `$PR_NUMBER.md` file in `unreleased_changes` or use `./tools/create-changelog-entry.py`) --------- Co-authored-by: Florian M <[email protected]>
1 parent a7f514b commit 2d6943d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

unreleased_changes/8853.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
### Changed
2+
- Zarr streaming a volume annotation will now respond with errors (500) if the underlying data encountered erros.

webknossos-tracingstore/app/com/scalableminds/webknossos/tracingstore/controllers/VolumeTracingZarrStreamingController.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,7 +352,8 @@ class VolumeTracingZarrStreamingController @Inject()(
352352
(fallbackData, fallbackMissingBucketIndices) <- remoteDataStoreClient.getData(
353353
remoteFallbackLayer,
354354
List(request)) ~> SERVICE_UNAVAILABLE // return 503 if the request fails, assuming the datastore is still initializing
355-
_ <- Fox.fromBool(fallbackMissingBucketIndices.isEmpty) ?~> "No data at coordinations in fallback layer" ~> NOT_FOUND // return 404 if the request worked but data is empty
355+
// We only expect missing buckets if something went wrong with loading the fallback layer, e.g. applying the agglomerate. Otherwise, a fill value is used and returned to us.
356+
_ <- Fox.fromBool(fallbackMissingBucketIndices.isEmpty) ?~> "Could not retrieve data from fallback layer" ~> INTERNAL_SERVER_ERROR
356357
} yield fallbackData
357358
} else Fox.successful(data)
358359
}

0 commit comments

Comments
 (0)