aboutsummaryrefslogtreecommitdiff
path: root/ref/store/files/batch_queue.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-31 02:09:47 +0000
committerGravatar Runxi Yu2026-03-31 02:14:33 +0000
commit6634953afb1af520ed6e523d96e58031b55058ac (patch)
treed670a2eb9af032ec8d33f933e48a78135bffceea /ref/store/files/batch_queue.go
parent*: Fix lints (diff)
signatureNo signature
ref/store: Shape Batch a bit more like Transaction and eagerly validate what we could.
Diffstat (limited to 'ref/store/files/batch_queue.go')
-rw-r--r--ref/store/files/batch_queue.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/ref/store/files/batch_queue.go b/ref/store/files/batch_queue.go
index 5937c6fb..afec5a78 100644
--- a/ref/store/files/batch_queue.go
+++ b/ref/store/files/batch_queue.go
@@ -1,5 +1,12 @@
package files
-func (batch *Batch) queue(op queuedUpdate) {
+func (batch *Batch) queue(op queuedUpdate) error {
+ err := (&refUpdateExecutor{store: batch.store}).validateQueuedUpdate(op)
+ if err != nil {
+ return err
+ }
+
batch.ops = append(batch.ops, op)
+
+ return nil
}