acoustic-carpenter-78188
06/10/2026, 7:00 PMsyncCb calls, and wasted workqueue throughput. With the default single-item batching this affects every item the cache tracks.
What changes were proposed in this pull request?
Record every item in an enqueued batch as in-flight, including the first one.
How was this patch tested?
Added TestEnqueueBatches_MarksSingleItemBatchHead to both flytestdlib/cache and flytestdlib/autorefreshcache. It drives the real enqueue path with the default single-item batching and asserts the enqueued item is marked in-flight.
Reproduce:
go test ./flytestdlib/cache/ ./flytestdlib/autorefreshcache/ -run TestEnqueueBatches_MarksSingleItemBatchHead -v
Before:
--- FAIL: TestEnqueueBatches_MarksSingleItemBatchHead
single-item batch head must be marked processing after enqueue
Should be true
FAIL github.com/flyteorg/flyte/v2/flytestdlib/cache
--- FAIL: TestEnqueueBatches_MarksSingleItemBatchHead
single-item batch head must be marked processing after enqueue
Should be true
FAIL github.com/flyteorg/flyte/v2/flytestdlib/autorefreshcache
After:
--- PASS: TestEnqueueBatches_MarksSingleItemBatchHead
ok github.com/flyteorg/flyte/v2/flytestdlib/cache
--- PASS: TestEnqueueBatches_MarksSingleItemBatchHead
ok github.com/flyteorg/flyte/v2/flytestdlib/autorefreshcache
Both packages also pass with -race.
Labels
fixed
Check all the applicable boxes
• I updated the documentation accordingly.
• All new and existing tests passed.
• All commits are signed-off.
flyteorg/flyteacoustic-carpenter-78188
06/10/2026, 8:10 PM