Skip to content

absorb new TDB_ERR_BUSY library code and pin L0 stall#140

Merged
guycipher merged 1 commit into
masterfrom
453
May 24, 2026
Merged

absorb new TDB_ERR_BUSY library code and pin L0 stall#140
guycipher merged 1 commit into
masterfrom
453

Conversation

@guycipher
Copy link
Copy Markdown
Member

@guycipher guycipher commented May 24, 2026

default to the library

The latest libtidesdb release adds TDB_ERR_BUSY at -14,
defined as the
case where the engine gave up after its internal
backpressure stall
budget ran out without freeing memtable or L0 capacity.
It is transient
in exactly the same way as TDB_ERR_MEMORY_LIMIT, so the
plugin now
folds it into the same three paths. The rc map sends it
to
HA_ERR_LOCK_WAIT_TIMEOUT alongside the existing memory limit branch,
tdb_with_backpressure_wait keeps retrying inside the configured
backpressure timeout instead of bubbling the error up immediately, and
the hton_commit unexpected error log filter excludes it
so a busy
commit no longer spams the error log. Without this change every write
heavy workload would surface ER_GET_ERRNO 1030 on the first stall
budget exhaustion even though the engine was healthy and just needed a
moment to drain.

tidesdb_default_l0_queue_stall_threshold shipped at 20 while the
underlying TDB_DEFAULT_L0_QUEUE_STALL_THRESHOLD is 10, so a freshly
created table queued twice as many immutable memtables before
backpressure kicked in compared with the same table created through
bare libtidesdb. The THDVAR default now matches the library

default to the library

The latest libtidesdb release adds TDB_ERR_BUSY at -14,
 defined as the
case where the engine gave up after its internal
backpressure stall
budget ran out without freeing memtable or L0 capacity.
 It is transient
in exactly the same way as TDB_ERR_MEMORY_LIMIT, so the
 plugin now
folds it into the same three paths. The rc map sends it
 to
HA_ERR_LOCK_WAIT_TIMEOUT alongside the existing memory
limit branch,
tdb_with_backpressure_wait keeps retrying inside the
configured
backpressure timeout instead of bubbling the error up
immediately, and
the hton_commit unexpected error log filter excludes it
 so a busy
commit no longer spams the error log. Without this
change every write
heavy workload would surface ER_GET_ERRNO 1030 on the
first stall
budget exhaustion even though the engine was healthy
and just needed a
moment to drain.

tidesdb_default_l0_queue_stall_threshold shipped at 20
while the
underlying TDB_DEFAULT_L0_QUEUE_STALL_THRESHOLD is 10,
so a freshly
created table queued twice as many immutable memtables
before
backpressure kicked in compared with the same table
created through
bare libtidesdb. The THDVAR default now matches the
library and the
README and reference doc say so explicitly.
tidesdb_defaults_alignment
is re-recorded against the new value so any future
drift has to update
the recorded result and be acknowledged.
@guycipher guycipher self-assigned this May 24, 2026
@guycipher guycipher merged commit 27a41ec into master May 24, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant