Skip to content

chore(deps): bump es-entity to 0.10.37#724

Merged
vindard merged 1 commit into
mainfrom
chore/bump-es-entity-0.10.37
May 27, 2026
Merged

chore(deps): bump es-entity to 0.10.37#724
vindard merged 1 commit into
mainfrom
chore/bump-es-entity-0.10.37

Conversation

@vindard
Copy link
Copy Markdown
Contributor

@vindard vindard commented May 27, 2026

Summary

Bumps es-entity from 0.10.36 → 0.10.37 to pick up two macro changes:

  • GaloyMoney/es-entity#137 — direction-aware NULL fallback in the cursor WHERE clause for nullable sort columns. Fixes a DESC NULLS LAST pagination bug where rows with NULL in the sort column were silently dropped from page 2+. ASC behavior unchanged.
  • GaloyMoney/es-entity#138 — opt-in nullable column attribute for non-Option<T> Rust types whose sqlx::Encode maps one variant to SQL NULL. Not used by cala-ledger today; landing it here unblocks downstream consumers (e.g. lana-bank's LoanToCollateralRatio column).

Why this is a one-line bump but a five-file diff

#137 changes the DESC SQL emitted for any Option<...> list_by column. In cala-ledger that's Account.external_id and AccountSet.external_id. The macro now emits

OR COALESCE(external_id < $4, $3 IS NULL OR (external_id IS NULL AND $4 IS NOT NULL))

instead of

OR COALESCE(external_id < $4, external_id IS NOT NULL)

so the cached SQL fingerprints in cala-ledger/.sqlx/ change. Same logical query, different hash. Regenerated via make sqlx-prepare.

Downstream

This release unblocks GaloyMoney/lana-bank#5898, which can then declare its loan_to_collateral_ratio column with the new nullable attribute instead of leaking storage shape into the entity accessor.

Test plan

  • make sqlx-prepare — regenerates 5 cached queries (4 Option<String> DESC pagination, 1 job_executions query whose fingerprint shifted from a parameter-cast adjustment).
  • SQLX_OFFLINE=true cargo check --workspace — clean.
  • Full CI

🤖 Generated with Claude Code


Note

Medium Risk
Changes generated list/pagination SQL for accounts and account sets (data completeness on paged APIs) plus job poller query shapes; low direct code churn but behavior-sensitive query semantics.

Overview
Bumps es-entity from 0.10.36 to 0.10.37 in the workspace and lockfile, with no application Rust changes beyond refreshed cala-ledger/.sqlx offline query metadata.

The upgrade pulls in macro-generated SQL fixes for DESC NULLS LAST cursor pagination on nullable sort columns (notably external_id on cala_accounts and cala_account_sets). The generated WHERE clause now uses a direction-aware NULL fallback so rows with NULL external_id are not dropped on later pages; ASC behavior is unchanged. Four cached list queries reflect that predicate change.

Two job_executions cached queries were also regenerated: execute_at / alive_at now bind as separate timestamptz parameters instead of reusing an earlier placeholder, which only updates SQL fingerprints for offline sqlx checks.

Reviewed by Cursor Bugbot for commit ecdc30e. Bugbot is set up for automated code reviews on this repo. Configure here.

es-entity 0.10.37 contains the direction-aware NULL fallback in cursor
WHERE clauses for nullable sort columns (GaloyMoney/es-entity#137) and
the opt-in `nullable` column attribute for non-Option<T> Rust types
(GaloyMoney/es-entity#138).

The macro change in #137 alters the DESC SQL emitted for `Option<...>`
columns — for cala-ledger this affects `Account.external_id` and
`AccountSet.external_id` pagination. New fingerprints replace the old
ones in `cala-ledger/.sqlx/`; semantics are unchanged for non-NULL rows
and now also include NULL rows on page 2+ for DESC (previously dropped).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vindard vindard marked this pull request as ready for review May 27, 2026 01:49
@github-actions
Copy link
Copy Markdown
Contributor

📊 Performance Report

Commit: ecdc30e
Updated: 2026-05-27 01:52:27 UTC

Cala Performance Benchmark Results (non-representative)

Criterion Benchmark Results (single-threaded)

Benchmark Time per Run Throughput % vs Baseline
post_simple_transaction 6.209ms 161 tx/s 0 (baseline)
post_and_recalculate_ec_account_set 16.307ms 61 tx/s -162.0%
post_and_batch_recalculate_ec_account_set 14.590ms 68 tx/s -134.0%
post_multi_layer_transaction 6.746ms 148 tx/s -8.0%
post_simple_transaction_with_effective_balances 7.665ms 130 tx/s -23.0%
post_simple_transaction_with_skipped_velocity 6.276ms 159 tx/s -1.0%
post_simple_transaction_with_velocity 7.791ms 128 tx/s -25.0%
post_simple_transaction_with_hit_velocity 3.800ms 263 tx/s +38.0%
post_simple_transaction_with_one_account_set 6.440ms 155 tx/s -3.0%
post_simple_transaction_with_five_account_sets 7.422ms 134 tx/s -19.0%
post_simple_transaction_with_ec_account_set 5.881ms 170 tx/s +5.0%

Load Testing Results (parallel-execution)

Scenario tx/s
1 parallel 98.24
2 parallel 158.39
5 parallel 183.76
10 parallel 179.23
20 parallel 173.55
2 contention 148.38
5 contention 160.15
2 acct_sets 130.90
5 acct_sets 146.37

Note: Performance results may vary based on system resources and database state.

Last updated by commit ecdc30e

@vindard vindard merged commit ab3fd50 into main May 27, 2026
6 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.

2 participants