tigerbeetle-node
Advanced tools
Changelog
TigerBeetle 0.16.11
Released: 2024-10-28
Make Grid.reserve()
abort rather than returning null.
When Grid.reserve()
aborts, that indicates that the data file size limit would be exceeded by
the reservation. We were already panicking in this case by unwrapping the result, but now it has
a useful error message.
Improve availability and performance by sending start_view
message earlier in the new-primary
recovery – as soon as the journal headers are repaired.
Refactor compaction to clarify the scheduling logic, schedule more aggressively, and make it easier to run multiple compactions concurrently. This also improved the benchmark performance.
Support multiversion (non-automatic) upgrades when the replica is started with --development
or --experimental
.
Allow a release's Git tag and config.process.release
to differ. This simplifies the release
process for hotfixes, when the Git tag is bumped but the config.process.release
is unchanged.
Changelog
TigerBeetle 0.16.10
Released: 2024-10-21
Improve performance & availability during view change by ensuring a replica only repairs the portion of the WAL that is required to become primary, instead of repairing it in its entirety.
Add a unit test for Zig's stdlib sort.
Stable sort is critical for compaction correctness. Zig stdlib does have a sort fuzz test, but it doesn't cover the presorted subarray case, and doesn't check arrays much larger than the sort algorithm's on-stack cache.
Fix a bug in the MessageBus wherein connections weren't being terminated during client teardown.
Fix a bug in the benchmark wherein the usage of --account-count-hot
was broken when used in
conjunction with the uniform
distribution.
Revamp the core_missing_prepares
liveness-mode check to correctly check for the prepares that a
replica should repair (after #2414).
Changelog
TigerBeetle 0.16.9
Released: 2024-10-15
TigerBeetle clients internally batch operations for improved performance. Fix a bug where an unclosed link chain could be batched before another linked chain, causing them to be treated as one long linked chain. Additionally, prevent non-batchable requests from sharing packets entirely.
AMOUNT_MAX
is used as a sentinel value for things like balancing transfers to specify moving
as much as possible. Correct and fix its value in the Java client. Thanks @tKe!
Improve the benchmark by adding Zipfian distributed random numbers, to better simulate realistic conditions and as a precursor to approximating YCSB.
Previously, TigerBeetle's clients disallowed empty batches locally, before the request was even sent to the cluster. However, this is actually a valid protocol message - even if it's not used by the current state machine - so allow empty batches to be sent from clients.
Revamp client documentation so that each snippet is self-contained, and standardize it across all languages.
Give the DevHub a fresh coat of paint, and fix passing seeds being blue in dark mode.
#2408, #2400, #2391, #2399, #2402, #2385
Improve VOPR logging and fix a few failing seeds.
Changelog
TigerBeetle 0.16.8
Released: 2024-10-07
Significantly reduced P100 latency by incrementally spreading the mutable table's sort during compaction. This leverages the optimization of sort algorithms for processing sequences of already sorted sub-arrays.
Improve the workload generator to support concurrent tests with different ledgers.
Fix VOPR seeds. For more awesome details about the backstory and solutions to these issues, please refer to the PR.
Update the REPL to support representing the maximum integer value as -0
,
serving as the AMOUNT_MAX
sentinel.
Additionally, other negative values such as -1
can be used to represent maxInt - 1
.
Also, include support for hexadecimal numbers for more convenient inputting of GUID/UUID
literals (e.g. 0xa1a2a3a4_b1b2_c1c2_d1d2_e1e2e3e4e5e6
).
Allow the timestamp
field to be set, enabling the REPL to be used for imported
events.
Use zig fetch
as a replacement for downloading files, removing dependence on external tools.
Port of Rust's dbg!
macro to Zig,
and the corresponding CI validation to prevent code using it from being merged into main
! 😎
Verify the release versions included in the multiversion binary pack at build time (not only
during runtime) and improve the tigerbeetle version --verbose
command's multiversion
output.
Fix a multiversioning issue where the binary size exceeded the read buffer, failing to parse the executable header.
Consistently use transient_error
instead of transient_failure
and cleanup the StateMachine
code.
Add missing links to the operations query_accounts
and query_transfers
in the documentation
and include the declaration for QueryFilter
and QueryFilterFlags
in the tb_client.h
header.
Clearer error message when the replica crashes due to a data file being too large, instructing the operator to increase the memory allocated for the manifest log.
Changelog
TigerBeetle 0.16.4
Released: 2024-09-30
This release introduces "transient errors": error codes for create_transfers
which depend on the
state of the database (e.g. exceeds_credits
). Going forward, a transfer that fails with a
transient error will not succeed if retried.
See the API tracking issue and the documentation for more details.
Reduce chance of recovering_head
status by recovering from torn writes in the WAL.
This improves the availability of the cluster, as recovering_head
replicas cannot participate in
consensus until after they repair.
Ensure idempotence for create_transfers
' "transient errors" with new result code
id_already_failed
. In particular, this guards against surprising behavior when the client is
running in a stateless API service.
Changelog
TigerBeetle 0.16.3
Released: 2024-09-23
Improve cluster availability by more aggressive recovery for crashes that happen while a replica is checkpointing.
Add a more efficient recipe for balance-conditional transfers. A balance-conditional transfer is a transfer that succeeds only if the source account has more than a threshold amount of funds in it.
Add a new recipe for enforcing debits_must_not_exceed_credits
on some subset of transfers (this
is a special case of a balance-conditional transfer, with the threshold value being equal to
transferred amount).
Add triaged
issue label to prevent newly opened issues from slipping through the cracks.
Add CI check for dead code.
Cleanup the source tree by removing top-level tools
directory.
Make sure that process-spawning API used for build-time "scripting" consistently reports errors when the subprocess fails or hangs.
Changelog
TigerBeetle 0.16.2
Released: 2024-09-16
Tighten up the VSR assertions so the transition to .recovering_head
can only be called from the
.recovering
status.
Make the primary abdicate if it is unable to process requests due to a broken clock.
Smoke integration test using the real multiversion binary.
Workload generator based on the Java client to be used in integration tests (i.e. Antithesis).
#2298, #2307, #2304, #2309, #2321
Remove Tracy
integration and dependencies.
Add JSON traces for events with multiple running instances, such as IO, lookups, and scans.
Add the ability to filter by user_data_{128,64,32}
and code
in get_account_transfers
and get_account_balances
.
Mute the log on stderr when building client libraries.
Reduce the log's severity of some entries logged as .err
to .warn
for less noise when
running with log_level = .err
.
Document and explain how time works in TigerBeetle ⏱️.
Refactor Forest.compact
and remove some dead code.
Rewrite commit_dispatch
, a chain of asynchronous stages calling each other, as a state machine
implementation that resembles linear control flow that is much easier to read.
Fix the Node.js example that was using an incorrect enum flag. Thanks for the heads up @jorispz!
Update outdated scripts in HACKING.md
.
Use git timestamps to build Docker images. This is a requirement for being deterministic in CI.
Devhub link to pending code reviews.
Changelog
TigerBeetle 0.16.1
Released: 2024-09-09
Improve view change efficiency; new heuristic for lagging replicas to forfeit view change.
A lagging replicas first gives a more up-to-date replica a chance to become primary by forfeiting view change. If the more up-to-date replica cannot step up as primary, the lagging replica attempts to step up as primary.
Complete rollout of the new state sync protocol.
Remove in-code remnants of the old state sync protocol. Replicas now panic if they receive messages belonging to the old protocol.
Improve log warnings for client eviction due to its version being too low/high.
Fix VOPR false positive wherein checkpoint was being updated twice in the upgrade path.
Fix typos found using codespell.
Document example for debiting multiple accounts and crediting a single account wherein the total amount to transfer to the credit account is known, but the balances of the individual debit accounts are not known.
Document the behavior of user_data_128/user_data_64/user_data_32
in the presence of pending
transfers.
Inline Dockerfile in the release code, removing tools/docker/Dockerfile.
Add support for tracing IO & CPU events. This allows for coarse-grained performance analysis, for example collectively profiling IO and CPU performance (as opposed to IO or CPU in isolation).
Remove explicit header sector locks, using a common locking path for prepare and header sectors.
Change CliArgs -> CLIArgs in accordance with TigerStyle.
Vendor llvm-objcopy
in the dependencies
repository in accordance with our "no dependencies" policy. This ensures users don't have to
manually install LLVM.
Assign correct date to the release binary date; it was earlier set to the epoch ("Jan 1 1970").
Introduce fatal errors for crashing the replica process in the face of uncorrectable errors (for example, insufficient memory/storage).
Add formatting check in the CI for the Go client.
Reduce dimensionality of configuration modes.
Removes the development configuration which was used to run the replica with asserts enabled, enabling asserts for the production configuration instead. Additionally, removes the -Dconfig CLI option, making production configuration the default.
Changelog
TigerBeetle 0.16.0
Released: 2024-09-02
This release is 0.16.0 as it includes a new breaking API change around zero amount transfers, as well as the behavior around posting a full pending transfer amount or balancing as much as possible. These are all gated by the client's release version.
If you're running a client older than 0.16.0, you'll see the old behavior where zero amount transfers are disallowed, but on newer clients these are supported and will create a transfer with an amount of 0.
Additionally, the sentinel value to representing posting the full amount of a pending transfer, or
doing a balancing transfer for as much as possible has changed. It's no longer 0, but instead
AMOUNT_MAX
.
See the tracking issue for more details.
Change how replicas that haven't finished syncing send a prepare_ok
message,
preventing them from falsely contributing to the durability of a checkpoint, which could
potentially cause liveness issues in the event of storage faults.
The new state sync protocol regressed the behavior where the replica would try to repair the WAL before switching to state sync, and this puts the old behavior back in.
WAL repair is used when the lagging replica's log still intersects with the cluster's current log, while state sync is used when when the logs no longer intersect.
Try to repair (but not commit) prepares, even if we don't have all the headers between checkpoint and head.
This makes things consistent between the normal and repair paths, and improves concurrency while repairing.
Reject prepares on the primary if its view isn't durable, much like solo clusters.
This solves a failing VOPR seed wherein a primary accepting prepares before making its log_view durable exposes a break in its hash chain.
A few sysctl
s and security frameworks (eg, seccomp) might block io_uring. Print out a more
helpful error message, rather than a generic "permission denied" or "system outdated".
Add the new imported
flag to allow user-defined timestamps when creating
Account
s and Transfer
s from historical events.
Allow Transfer
s with amount=0
and change behavior for balancing and post-pending
transfers, introducing the constant AMOUNT_MAX
to replace the use of the zero sentinel when
representing the maximum/original value in such cases. Note that this is a
breaking change.
Also, explicitly define optional indexes, which previously were determined simply by not indexing zeroed values.
Introduce a new flag, Account.flags.closed
, which causes an account to reject any further
transfers, except for voiding two-phase transfers that are still pending.
The account flag can be set during creation or through a closing transfer. In the latter case, closed account can be re-opened by voiding or expiring the closing transfer.
Deprecates the old state sync protocol, no longer supporting both protocols simultaneously. As planned for this release, it only ignores old messages, allowing replicas to upgrade normally. In the next release, replicas would panic if they receive an old message.
Move multiversion build logic into build.zig
from release.zig
. This makes it much easier to
build multiversion binaries as part of a regular zig build
, without having to invoke CI or
release process specific code that's normally part of release.zig
.
It also makes it possible to build multiversion binaries on platforms that aren't x86_64 Linux.
Refactor the Multiversion API, bringing it in line with pre-existing code patterns.
Previously, TigerBeetle release numbers were based on a finicky conversion of GitHub's internal action run number to a version number.
This was error prone, and difficult to reason about before hand (what would the given version number for a release be?). Instead, make it so this very changelog is the source of truth for the version number which is explicitly set.
Change init
function signatures to allow for in-place initialization. This addresses the silent
stack growth caused by intermediate copy/move allocations during the initialization of large
objects.
Specifically, the Forest
struct can grow indefinitely depending on the number of
Grooves
/IndexTrees
needed to support the StateMachine's custom logic, causing TigerBeetle to
crash during startup due to stack-overflow.
Don't cancel in-progress GitHub actions on the main branch. In particular, this ensures that the devhub records the benchmark measurements for every merge to main, even if those merges occur in quick succession.
Make the experimental feature aof
(append-only file) a runtime flag instead of a build-time
setting. This simplifies operations, allowing the use of the same standard release binary in
environments that require aof
.
Renames the LSM constant lsm_batch_multiple
to lsm_compaction_ops
, providing clearer meaning
on how it relates to the pace at which LSM tree compaction is triggered.
Add support for indexing flags, namely the new imported
flag.
Changelog
TigerBeetle 0.15.6
Released: 2024-08-19
Add new state sync protocol, fixing a couple of liveness issues. State sync is now performed as part of the view change.
Major state sync performance improvements.
Ensure u128
(and related type) consistency across client implementations.
Fix multiversioning builds for aarch64 macOS.
Automatically include oldest supported releases in release notes.
Refactor build.zig
to break up the biggest function in the codebase.
Minor improvements to zig install scripts.