• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

tarantool / go-xlog / 42291373508
93%
master: 93%

Build:
Build:
LAST BUILD BRANCH: bigbes/release-v0.2.0
DEFAULT BRANCH: master
Ran 06 Nov 2026 08:48PM UTC
Jobs 1
Files 43
Run time 1min
Badge
Embed ▾
README BADGES
x

If you need to use a raster PNG badge, change the '.svg' to '.png' in the link

Markdown

Textile

RDoc

HTML

Rst

06 Nov 2026 06:57PM UTC coverage: 92.913% (+1.2%) from 91.717%
42291373508

Pull #49

github

bigbes
format: state the aliasing of decoded bytes once and add Clone

Every decoder is zero-copy: BodyRaw, the raw fields of the body structs
and the FieldName and Value of an operation are sub-slices of the input.
That was said per function, in three phrasings, and not at all on some
types. A file reader gets away with it, handed a fresh region per block;
a wire consumer reuses one receive buffer, and the tuple it kept from one
row is overwritten by the next, silently.

The package doc now states the contract once, in an Aliasing section:
what aliases, why keeping it past the next reuse of the buffer is a
use-after-free in all but name, and, per type, the fields that do -
XRow.BodyRaw; DMLBody Tuple, Key, Ops, OldTuple, NewTuple and Arrow;
VyStmtBody Tuple, Key and Ops; VyRunInfo MinKey, MaxKey and Bloom;
VyPageInfo MinKey; the values of VyLogBody.Keys; Operation FieldName and
Value; the raw argument of OnUnknown; the row slices of DecodeTxBlock.
RaftBody and SynchroBody alias nothing. The per-function notes become a
pointer to it, and each aliasing field says so in the same words.

So that callers have an obvious right answer instead of hand-rolling
append([]byte(nil), ...) and missing a field, XRow, Operation and every
body struct get Clone and CloneInto, and a slice of operations
CloneOps and CloneOpsInto. Clone is a deep copy sharing no memory with
the source; it copies all the raw fields of a value into one allocation,
so a DML body clones in 2 allocs whatever it carries. CloneInto copies
into a caller-owned value and reuses the capacity of its slices: once
warm, CloneInto of an XRow, a DMLBody, the vinyl bodies and
CloneOpsInto allocate nothing. Nil stays nil and empty stays empty, so a
clone equals its source. A slice of dst sharing its array with the
source - dst is the source or a shallow copy of it, or was decoded from
the same buffer - is replaced rather than written into, and maps are
never reused, as the decoders never reuse one.

The issue al... (continued)
Pull Request #49: format: state the aliasing of decoded bytes once and add Clone

778 of 794 new or added lines in 10 files covered. (97.98%)

4313 of 4642 relevant lines covered (92.91%)

5846.8 hits per line

Uncovered Changes

Lines Coverage ∆ File
8
96.84
format/ops.go
4
97.2
-1.64% format/xrow.go
3
92.16
0.49% format/body_raft.go
1
97.53
0.31% format/body_vylog.go
Jobs
ID Job ID Ran Files Coverage
1 42291373508.1 06 Nov 2026 08:48PM UTC 43
92.91
GitHub Action Run
Source Files on build 42291373508
  • Tree
  • List 43
  • Changed 8
  • Source Changed 0
  • Coverage Changed 8
Coverage ∆ File Lines Relevant Covered Missed Hits/Line
  • Back to Repo
  • Pull Request #49
  • PR Base - master (#42197373739)
  • Delete
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE TRIAL · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc