Skip to content

feat: prune OR/range, pool PostgreSQL, 2PC stress, honest docs - #60

Merged
renecannao merged 5 commits into
fix/shard-dml-routingfrom
fix/shard-prune-pg-docs
Aug 20, 2026
Merged

feat: prune OR/range, pool PostgreSQL, 2PC stress, honest docs#60
renecannao merged 5 commits into
fix/shard-dml-routingfrom
fix/shard-prune-pg-docs

Conversation

@renecannao

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #56 (which now contains #57#59).

  • Prune: id = 1 OR id = 2 unions shards; RANGE id <= N / BETWEEN prunes. id = ? still scatters.
  • PG pool: ThreadSafeMultiRemoteExecutor dispatches PostgreSQL through PgConnectionPool + pinned PooledPgSession.
  • Stress: engine_stress_test uses DistributedTransactionManager.
  • Docs: README add_table (not add_sharded_table); Session example uses 2PC; pooling/DML claims match the code.

Validation

  • ./run_tests --gtest_brief=1: 1325 passed, 39 skipped
  • ./run_tests --gtest_filter='DistributedPlannerTest.ShardRouting_*:ShardMapRangeTest.*'

Prune shard_key OR-of-equalities and RANGE inequalities/BETWEEN.
Placeholders still scatter. ThreadSafeMultiRemoteExecutor pools
PostgreSQL as well as MySQL. engine_stress_test uses
DistributedTransactionManager. README matches current Session/ShardMap
and tool 2PC behavior.
@coderabbitai

coderabbitai Bot commented Aug 19, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ed04c1ec-52c7-4a49-a09f-a6bfe5328b4e

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

…ribute

Flatten UNION ALL remotes so N shards open together. Route composite HASH
keys, fail unknown tables, and move rows on shard-key UPDATE. LIST misses
fail closed and BETWEEN/IN prune; composite colocated joins push when every
key part is equated. Cache the logical plan and re-distribute on each hit.
- Composite RANGE now routes and prunes on the first key component
  (LIST still rejects composites; HASH uses all parts).
- Semi-join prune: when one side of a join is sharded and the other is
  not, the engine materializes the small side and pushes an IN-list
  onto the sharded probe side.
- New demo scripts for PostgreSQL shards (16432/16433) exercising
  RANGE + LIST + cross-shard 2PC with DistributedTransactionManager
  in POSTGRESQL mode.
- sqlengine now auto-selects PostgreSQL 2PC dialect when all backends
  are pgsql://.
- Added planner and live-backend tests; full suite now 1344 passed.

Stacked on PR #61.
…range

feat: composite RANGE, semi-join prune, PG LIST/RANGE + 2PC demo
feat: parallel scatter, composite keys, LIST prune, plan-cache redistribute
@renecannao
renecannao merged commit 5deab6f into fix/shard-dml-routing Aug 20, 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.

1 participant