Skip to content

feature: connect() options db/password/username/tcp_keepalive, hmget(… - #299

Merged
zhuizhuhaomeng merged 3 commits into
masterfrom
open-issue-fixes
Sep 18, 2026
Merged

zhuizhuhaomeng merged 3 commits into
masterfrom
open-issue-fixes

Conversation

@isshe

@isshe isshe commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

…) with a table, and two bug fixes.

…) with a table, and two bug fixes.

* bugfix: integer arguments with 15 or more digits were sent in scientific
  notation because tostring() formats numbers with %.14g (#135).
* bugfix: a connection with an open MULTI could be put back into the
  connection pool; set_keepalive() now returns nil and "in transaction"
  until EXEC or DISCARD (#176).
* feature: connect() options "db", "password" and "username", applied to
  newly established connections only, with a separate connection pool per
  database and ACL user (#53).
* feature: connect() option "tcp_keepalive" enabling SO_KEEPALIVE (#263).
* feature: hmget() accepts a table of fields, like hmset() (#29).
* doc: error handling and connection lifecycle, ACL authentication,
  multi-word commands, pool size semantics (#147, #150, #151, #173, #174,
  #180, #206, #220, #234, #256, #265).
* bumped _VERSION to 0.34 (v0.33 is already tagged).
isshe and others added 2 commits September 18, 2026 19:24
…pool names for db/username.

* The transaction guard for set_keepalive() is set by MULTI and cleared only
  by an acknowledged EXEC or DISCARD; error replies (EXECABORT, NOPERM) keep
  the connection out of the pool, and pipelined MULTI/EXEC/DISCARD are
  settled when commit_pipeline() reads their replies. Previously a pipelined
  or rejected DISCARD, or cancel_pipeline() without a pipeline, could put a
  connection with an open transaction back into the pool.
* The default pool name for the "db" and "username" connect() options is now
  "<host>:<port>/db=<n>/user=<name>", and "db" must be numeric, so that
  {db = 1} and {username = "1"} can no longer share a pool.
* hmget() and the transaction methods go through the module-prefix dispatch
  again, so red:<prefix>():hmget() keeps working.
Dispatch prefixed multi, exec, and discard commands without changing
Redis transaction state. Forward all arguments through the wrappers so
module commands retain their original call semantics.

Add regression tests for direct and pipelined module commands, argument
encoding, and connection pooling with and without an open transaction.
The tests use a mock Redis server without requiring an external module.

Validated 372 assertions across HTTP and stream, including RedisBloom
integration tests, plus real module probes for mixed pipelines,
cancellation, rejected commands, and connection reuse. Lua lint and
whitespace checks passed.
@zhuizhuhaomeng
zhuizhuhaomeng merged commit 0d014dd into master Sep 18, 2026
1 check 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.

2 participants