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 that proofreading got stuck with expired token #7598

Merged
merged 3 commits into from
Jan 31, 2024
Merged
Show file tree
Hide file tree
Changes from all 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 @@ -18,6 +18,7 @@ For upgrade instructions, please check the [migration guide](MIGRATIONS.released
### Fixed
- Fixed rare SIGBUS crashes of the datastore module that were caused by memory mapping on unstable file systems. [#7528](https://github.com/scalableminds/webknossos/pull/7528)
- Fixed loading local datasets for organizations that have spaces in their names. [#7593](https://github.com/scalableminds/webknossos/pull/7593)
- Fixed a bug where proofreading annotations would stay black until the next server restart due to expired but cached tokens. [#7598](https://github.com/scalableminds/webknossos/pull/7598)

### Removed

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -217,6 +217,8 @@ trait DataLayer extends DataLayerLike {
dataSourceId: DataSourceId,
sharedChunkContentsCache: Option[AlfuCache[String, MultiArray]]): BucketProvider

def bucketProviderCacheKey: String = this.name

def containsResolution(resolution: Vec3Int): Boolean = resolutions.contains(resolution)

def doesContainBucket(bucket: BucketPosition): Boolean =
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ class BinaryDataService(val dataBaseDir: Path,
// dataSource is null and unused for volume tracings. Insert dummy DataSourceId (also unused in that case)
val dataSourceId = if (request.dataSource != null) request.dataSource.id else DataSourceId("", "")
val bucketProvider =
bucketProviderCache.getOrLoadAndPut((dataSourceId, request.dataLayer.name))(_ =>
bucketProviderCache.getOrLoadAndPut((dataSourceId, request.dataLayer.bucketProviderCacheKey))(_ =>
request.dataLayer.bucketProvider(remoteSourceDescriptorServiceOpt, dataSourceId, sharedChunkContentsCache))
bucketProvider.load(readInstruction, shardHandleCache).futureBox.flatMap {
case Failure(msg, Full(e: InternalError), _) =>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,8 @@ case class EditableMappingLayer(name: String,
sharedChunkContentsCache: Option[AlfuCache[String, MultiArray]]): BucketProvider =
new EditableMappingBucketProvider(layer = this)

override def bucketProviderCacheKey: String = s"$name-token=$token"

override def mappings: Option[Set[String]] = None

override def defaultViewConfiguration: Option[LayerViewConfiguration] = None
Expand Down