Skip to content

v0.4.0

Choose a tag to compare

@liran liran released this 08 Nov 04:58
db27d25

Source: db27d25f0d80798f4e9277c24339d75e945cea62 (merged main).

Image: ghcr.io/batchstream/weir:v0.4.0@sha256:07f07d339e1deff548d8d936561b3a47f585c78dbdefac31f18d420228f61567. Archives are provided for Linux and macOS amd64/arm64; verify them with sha256sum -c SHA256SUMS. weir version reports v0.4.0 and the source revision.

This release folds queued mutations of one record into one write, so a client that keeps rewriting the same records, such as merges into one seller from many product pages, no longer queues behind itself. The client API and configuration are unchanged from v0.3.0; deploy with weir-charts 0.21.0.

  • Folding: mutations of one record that share a batch, from one or several streams, run in queue order and each keeps its own result, including when callers leave, writes conflict or fail, or the backend rejects the combined document. weir_store_folded_mutations_total counts them, and the adaptive limit counts a folded batch at its unfolded size (#165, #166).
  • Search: every mutation but backend expressions folds into one write after one real-time read, conditional on that read, and query-visible mutations wait for one refresh. Search validates only the document the write sends, so a document that a later mutation replaced before the write is never checked (#165).
  • MongoDB: puts and deletes of a record collapse to the last of them. Lua programs of a record run in order on the transaction's one read and write each changed document in one ordered bulkWrite and one commit, so validators and unique indexes check every document as they would one program at a time. Creates, replaces and backend expressions still run one at a time (#166).

See batching for the exact semantics.