From 219d598e10f901e9aca859ef4f67e162f8c8fc49 Mon Sep 17 00:00:00 2001 From: annie Date: Mon, 1 Jun 2026 18:20:41 -0400 Subject: [PATCH] batch: document FormatMajorVersion responsibility on SetRepr --- batch.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/batch.go b/batch.go index 759baf2c86..ae67abac48 100644 --- a/batch.go +++ b/batch.go @@ -1323,6 +1323,10 @@ func (b *Batch) Repr() []byte { // // SetRepr may return ErrInvalidBatch if the supplied slice fails to decode in // any way. It will not return an error in any other circumstance. +// +// The caller is responsible for ensuring that the batch is applied to a DB at +// a FormatMajorVersion that supports all of the operation kinds encoded in the +// supplied slice. func (b *Batch) SetRepr(data []byte) error { h, ok := batchrepr.ReadHeader(data) if !ok {