feature: connect() options db/password/username/tcp_keepalive, hmget(… - #299
Merged
Merged
Conversation
…) 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
force-pushed
the
open-issue-fixes
branch
from
September 18, 2026 09:08
4d8116e to
0019d1a
Compare
…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
approved these changes
Sep 18, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
…) with a table, and two bug fixes.