Unistore: Batch write events (#101381)

* Batch write events

* Improve instrumentation

* Measure batch phases

* Detect lock contention

* remove the execBatch goroutine

* removing tracing prefix

* detect context cancel

* batch channel map
This commit is contained in:
Georges Chaudy
2025-03-13 10:24:12 +02:00
committed by GitHub
parent 2d71c8ae72
commit 3589baac68
21 changed files with 632 additions and 527 deletions
+3 -1
View File
@@ -245,7 +245,9 @@ func (b *backend) processBulk(ctx context.Context, setting resource.BulkSettings
}
// Make sure the collection RV is above our last written event
_, err = b.resourceVersionAtomicInc(ctx, tx, key)
_, err = b.rvManager.ExecWithRV(ctx, key, func(tx db.Tx) (string, error) {
return "", nil
})
if err != nil {
b.log.Warn("error increasing RV", "error", err)
}