Fix object metadata collection not found (#11306)

## Context
This fix ensures that even if a datasource creation promise throws and
is cached, subsequent requests won't return that cached exception.
Also adding a TTL on MetadataObjectMetadataOngoingCachingLock, this is
not something that should stay in the cache forever and could
potentially unlock some race conditions (the origin of the issue is
probably due to performances where the lock is not removed as it should
be after metadata computation and caching)
This commit is contained in:
Weiko
2025-04-01 16:38:43 +02:00
committed by GitHub
parent 7e07b3f7e9
commit 8385e2d08b
6 changed files with 399 additions and 205 deletions

View File

@ -73,7 +73,7 @@ export class WorkspaceCacheStorageService {
return this.cacheStorageService.set<boolean>(
`${WorkspaceCacheKeys.MetadataObjectMetadataOngoingCachingLock}:${workspaceId}:${metadataVersion}`,
true,
TTL_INFINITE,
1_000 * 60, // 1 minute
);
}