rqlite 10.5.1 to 10.6.0: Numeric Error Codes, Voter Promotion, and CDC Fixes

rqlite is a lightweight, open-source, fault-tolerant relational database built on SQLite and the Raft consensus protocol.

Versions 10.5.1 through 10.6.0 focus on four core themes: richer error reporting in the API, changing a node’s voting status at runtime, a security fix for authentication files, and further work on Change Data Capture (CDC).

The changes are backward-compatible. Operators who use authentication files should upgrade to 10.6.0 and review the security fix below.

Query Logging and Better Errors

Until now, a client that wanted to know why a request failed had to read the error text. Version 10.6.0 adds a new field to API responses, error_v2, which can carry numeric SQLite error codes. Clients can now identify errors by code.

The groundwork came in 10.5.3, which moved the database layer to a richer error type that keeps the SQLite error code attached to each failure.

Version 10.6.0 also adds query logging, which operators enable with a command-line flag.

Promoting and Demoting Nodes

Version 10.6.0 lets operators change a node’s role without removing it from the cluster, which makes cluster changes safer. POST /demote turns a voting node into a non-voter, and POST /promote turns a non-voting node into a voter. The rqlite shell offers the same through .demote and .promote, each of which takes a node ID.

Authentication File Security Fix

Version 10.6.0 fixes a security issue in how rqlite handles authentication files. A misconfigured file could transfer one user’s permissions to a second username, so a user with no explicit permissions could gain elevated ones. Correctly configured users are not affected.

CDC Correctness

Change Data Capture received fixes in every release of this series. Version 10.5.2 fixes a case where CDC did not emit all events after a Bulk Request, and ensures the streamer keeps its Raft index after a commit or rollback. Version 10.5.3 fixes an off-by-one error in the retry logic, and sets up CDC hooks once, at Store start-up, as part of the database driver.

Version 10.6.0 tightens high watermark handling. A follower’s high watermark never moves backwards, and the watermark now advances past dropped batches.

SQLite Safeguards

rqlite depends on SQLite running in a precise configuration. Version 10.5.2 fixes an edge-case where rqlite could create a database connection without disabling WAL auto-checkpointing. Version 10.5.3 adds unit tests which confirm that the WAL-related and SYNCHRONOUS compile-time options are set as rqlite needs, so a bad build fails in testing, not in production.

Console Updates

The web console now uses the term “read replicas”, has an improved topology view, and merges the home and topology tabs into one.

For full details, see the CHANGELOG. To discuss these releases or ask questions, join the rqlite Slack channel.

Leave a Reply

Your email address will not be published. Required fields are marked *