Change and fix BatchingQueue implementation (#5044)

* BatchingQueues allowed processing to happen more than one at a time.  Simplify and don't allow this.

* Use proper logging

* clean up and fix tests

* add more batchingqueue tests

* fixed according to AI

* fix: linting issues

* make deferment more intelligent and fix logging

* add to deferment tracking when bulk adding reads

* format

* fix tests
This commit is contained in:
Adam Hathcock
2025-07-10 10:13:58 +01:00
committed by GitHub
parent 1babe5859d
commit f86893935f
11 changed files with 257 additions and 119 deletions
@@ -34,8 +34,8 @@ export class ObjectLoader2 {
maxCacheReadSize: 10_000,
maxCacheWriteSize: 10_000,
maxWriteQueueSize: 40_000,
maxCacheBatchWriteWait: 3_000,
maxCacheBatchReadWait: 3_000
maxCacheBatchWriteWait: 1_000,
maxCacheBatchReadWait: 1_000
}
this.#gathered = new AsyncGeneratorQueue()
@@ -56,10 +56,10 @@ export class ObjectLoader2 {
await Promise.all([
this.#gathered.disposeAsync(),
this.#downloader.disposeAsync(),
this.#cacheReader.disposeAsync(),
this.#cacheWriter.disposeAsync()
])
this.#deferments.dispose()
this.#cacheReader.dispose()
}
async getRootObject(): Promise<Item | undefined> {