github readysettech/readyset stable-261124

57 minutes ago

Release Notes

Readyset is currently released as a docker container and Linux distro binary packages. For installation with docker, see the Install with Docker documentation. Available Linux distribution binary packages for x86_64/amd64 and arm64/aarch64 include deb package for Ubuntu 22.04, Debian 12 and later, and rpm packages for Amazon Linux 2023 and RedHat 9. See package installation instructions.

Highlights

  • Lower CPU use on text-protocol queries: Readyset skips rewrite steps a query doesn't need. Initial tests showed 11–18% less Readyset CPU per query.
  • Faster replication of bulk UPDATEs and DELETEs.
  • Shallow cache mode serves every PostgreSQL database: clients connected to any database on the upstream are served, and the upstream URL no longer has to name a database. Behavior change: outside shallow mode, Readyset now rejects clients that connect to a database other than the one in the upstream URL.
  • Better MySQL JSON fidelity: JSON is returned with MySQL's key order and spacing. Upgrading resnapshots all tables. (Community contribution from @floze-the-genius.)
  • PostgreSQL interval support for shallow caches over the extended query protocol.
  • New metric: readyset_shallow_shallow_refresh_pool_database_switches.

Detailed Changelog

  • 4f733b9: Fixed a bug where a write that interleaved join keys on the right side of a left join could leave a stale or duplicate null-extended row in the cached results.
  • 34a3fce: In shallow cache mode, Readyset now serves PostgreSQL clients connected to any database on the upstream, and the upstream URL no longer needs to specify a database. Outside shallow cache mode, Readyset now rejects PostgreSQL clients that connect to a database other than the one specified in the upstream URL. Previously, it served those clients data from the database specified in the URL.
  • fb076ab: Added the readyset_shallow_shallow_refresh_pool_database_switches metric, which counts the number of times a shallow refresh worker reconnects to a different upstream database.
  • 5879b0d: Deep caches now return MySQL JSON columns with the same key order and spacing as MySQL. They also no longer drop updates to rows whose JSON contains a datetime at midnight. Upgrading resnapshots all tables. Thanks to @floze-the-genius for the contribution.
  • e4c66a7: Fixed a bug where updates to MySQL rows whose JSON column contained doubles, such as 1e15 or 1e-7, were not applied to deep caches.
  • f21f1e0: Sessions with an intervalstyle other than the default postgres are now served by the upstream database.
  • f498c3d: PostgreSQL interval values are now supported when shallow caches are accessed over the extended query protocol.
  • 3c7d34d: Fixed deep caches on PostgreSQL ordering text columns without an explicit collation differently from the database when its collation is a libc locale, such as en_us.utf8.
  • 8969e23: Fixed a bug where prepared statements with bind values in the left operand of an IN expression could return incorrect results when selecting from a shallow cache.
  • 32124a9: When a key for an integer column is provided as a string, such as '30' or '3e1', the string is converted to an integer. Strings containing non-integers, such as '3.5', are no longer converted.
  • 1079d51: Reads with a literal LIMIT and no ORDER BY now reach a cache created with LIMIT ?.
  • 18dd3fd: Prepared statements with a literal LIMIT now reach a cache created with LIMIT ?.
  • e8a3aac: Converting CHAR to TEXT or VARCHAR in PostgreSQL no longer preserves padding.
  • 87667af: Readyset now rebuilds all of a failed domain’s indexes when the domain recovers. Previously, the next cache miss could panic with “lookup on non-indexed column set” and cause the domain to fail again.
  • b0990f7: Readyset now reports the right-side key of a left join—for example, r.id in l LEFT JOIN r ON l.a = r.id—with the type and column metadata of r.id, rather than l.a.
  • a0848cd: Fixed PostgreSQL shallow caches serving results keyed to session settings that a rolled-back transaction had reverted, such as a role or request.jwt.claims set inside the transaction.
  • 6e77f60: Fixed until-write shallow caches sending reads upstream for the rest of a transaction after SAVEPOINT or RELEASE SAVEPOINT over the simple query protocol.
  • 7f568d0: Fixed PostgreSQL shallow caches serving results keyed to the login user after RESET ALL, which preserves the role set by SET ROLE.
  • 9cb198c: Fixed handling of PostgreSQL SET LOCAL search_path. The setting is now correctly reset after a transaction ends.
  • b132bdc: Fixed shallow caches over a view serving stale or cross-tenant rows after the view was redefined, its security_invoker setting changed, or row-level security (RLS) was enabled on an underlying table.
  • ec84491: Fixed PostgreSQL views not being replicated when a view with the same name exists in another schema.
  • b403639: Fixed the undesired recreation, after a restart, of a dropped shallow cache that was created by an older version of Readyset.
  • 4584b7b: Fixed a cache over a join that reads a table with duplicate rows returning an extra copy of a row after a replay into the join failed partway through.
  • 3bc2c8c: Readyset now returns the correct rows for a cache that filters a window function by a column outside its PARTITION BY clause.
  • 8788e03: Fixed PostgreSQL shallow caches serving results keyed to a search_path or session variable that RESET ALL or DISCARD ALL had reset.
  • 93443d8: Fixed shallow caches over a view that calls a SQL function reading an RLS-protected table from serving rows across tenants. Queries over views that call volatile functions are no longer cached.
  • 10e30bb: Fixed arithmetic on decimal columns in MySQL deep caches returning too few decimal places—for example, rounding DECIMAL(10,2) + DECIMAL(8,4) to two places—and rounding half to even or to -0. Also fixed PostgreSQL deep caches failing to return an integer added to a numeric value, and comparing a boolean with a string such as 'true' as text.
  • 34924f7: Fixed GREATEST and LEAST on an integer and a decimal in deep caches returning the wrong value—for example, LEAST(int_col, 0.5) returning 1 on PostgreSQL. Also fixed MySQL CASE, COALESCE, and IFNULL on decimals rounding to the number of decimal places in one branch, and CASE and IFNULL on an integer and a decimal dropping the connection.
  • fdb6055: Fixed ROUND() on a decimal in MySQL deep caches returning trailing zeros, such as 2.00 instead of 2.
  • 6bdc207: Fixed deep caches writing a decimal as a JSON string instead of a number, as in JSON_OBJECT('a', d).
  • 1c85191: Fixed MySQL decimal literals such as 0.1 being evaluated as floating-point numbers in deep caches, which caused 0.1 + 0.2 to return 0.30000000000000004 instead of 0.3.
  • ec13b5e: Fixed deep caches truncating a string longer than a VARCHAR or CHAR column before comparing it. For example, name = 'abcd' could return rows where name was 'abc'.
  • 72a3c40: Fixed deep caches rounding floating-point halves away from zero in casts to integer types and in ROUND(). For example, 2.5 became 3 instead of 2.
  • 2504ee9: Fixed deep cache reads that compare an integer column with an out-of-range value, such as int_col = 5000000000, failing instead of returning the same rows as the database.
  • 929d556: Fixed PostgreSQL deep caches returning 1 or 0 instead of true or false when casting a boolean to text.
  • 385676f: Fixed PostgreSQL deep caches interpreting UUID text differently from PostgreSQL—for example, accepting a urn:uuid: prefix or rejecting a hyphen after every four digits.
  • 6d0d22f: Fixed a crash when a prepared statement’s LIMIT or OFFSET was bound to NULL. Reads with a LIMIT or OFFSET bound to a float or string are now sent to the upstream database.
  • 6bb57b8: Fixed PostgreSQL connections remaining open after the client sent TERMINATE.
  • 3960138: Readyset now uses less CPU for queries sent as text by skipping rewrite steps that a query does not need. For example, a point lookup skips the join and subquery steps. Initial tests showed an 11–18% reduction in Readyset CPU per query; actual gains will vary by hardware and workload.
  • 3f4945c: Fixed replicated updates and deletes being lost or applied to the wrong row in deep caches when a table’s primary key lists its columns in a different order from the table. This affected PostgreSQL and MySQL with binlog_row_image=minimal.
  • 8d41a55: Improved replication throughput for bulk updates and deletes.
  • 918e662: Fixed false query sampler mismatches after a sampled query took longer than sampler_query_timeout_ms.
  • 7a6c541: Fixed a shallow cache bug that prevented empty PostgreSQL result sets from prepared statements and refreshes from being cached.
  • 5cd2061: Fixed MySQL deep caches reporting a smaller column type than MySQL for integer arithmetic and comparisons—for example, INT for a + b and TINYINT for a = b, when MySQL reports BIGINT.
  • f0cb6a5: Fixed MySQL deep caches returning NULL for arithmetic on a signed and an unsigned integer, such as a + b when a is -7 and b is an unsigned 8. Also fixed missing rows when an unsigned column is compared with a negative number.
  • 95d5ecd: Fixed MySQL deep caches failing or returning NULL for arithmetic on a string column, such as a + v when v is a VARCHAR containing '1.5'.
  • de2f035: Fixed PostgreSQL deep caches sending values that a client could not read for arithmetic on a REAL and an integer, such as r + i.
  • 115c11a: Fixed deep caches rounding differently from the database, such as for ROUND(d, '1') and ROUND('3.5') in MySQL. Also fixed PostgreSQL deep caches returning ROUND(r) on a REAL in a form that clients could not read.
  • 932c4b1: Fixed PostgreSQL deep caches returning NULL from GREATEST or LEAST when only some arguments are NULL, or when one argument is a numeric NaN.

Don't miss a new readyset release

NewReleases is sending notifications on new releases.