Skip to content

v0.12.2

Choose a tag to compare

@github-actions github-actions released this 28 Oct 17:12
· 11 commits to main since this release
d1ac4cf

A JSON Lines record of any length reads back

Summary

This release lifts the 10 MiB ceiling that the JSON Lines codec's Decode placed on one line, so a view returns every record that a writer persisted. The read contract now states that invariant.

Highlights

  • Decode has no ceiling of its own: the decoder still starts with a small buffer and grows it to the longest line. Earlier releases refused a line longer than 10 MiB with bufio.Scanner: token too long, while Encode wrote lines of any length. A record such as an 8 MiB blob encoded as base64 could be written and never read.
  • The contract names the invariant: CONTRACT_READ_API.md and the Codec.Decode doc state that Decode returns every record that Encode wrote, and that a codec bounds Decode no more tightly than Encode.
  • Tests pin both ends: a round trip of an 11 MiB record, and a table of how a decode ends, from an empty stream to a reader's error.

Full Changelog: v0.12.1...v0.12.2