version3.7.0 release#35
Merged
Merged
Conversation
Add row-id range reservations for concurrent implicit inserts, track pending WAL page images, and rebase hot right-edge leaf inserts against pending commits so one-row concurrent insert workloads can build durable flush fan-in. Update insert fan-in diagnostics, benchmark guardrails, tests, and docs for hot explicit right-edge, auto-ID, and disjoint explicit-key shapes. Validation: dotnet test .\CSharpDB.slnx -c Release; dotnet run --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -c Release -- --insert-fan-in-diagnostics --repro; dotnet run --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -c Release -- --strict-insert-compare --repro.
Close the current Advanced cost-based query optimizer and Async I/O batching roadmap phases as completed current-phase work, while keeping adaptive re-optimization and public histogram inspection as separate planned items. Add optimizer close-out diagnostics for heavy-hitter equality, histogram range estimates, composite-prefix correlation, and bounded join reordering. Add async I/O close-out diagnostics for save/backup/restore, vacuum and FK logical rewrites, database inspector scans, and live WAL inspector scans. Refresh roadmap, query/durable-write docs, async I/O audit notes, benchmark catalog, README close-out tables, and release-core manifest metadata with the May 6 guardrail pass. Validation: dotnet test .\CSharpDB.slnx -c Release; dotnet run -c Release --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -- --optimizer-closeout --repro; dotnet run -c Release --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -- --async-io-closeout --repro; pwsh -NoProfile .\tests\CSharpDB.Benchmarks\scripts\Run-Perf-Guardrails.ps1 -Mode release (PASS=187, WARN=0, SKIP=0, FAIL=0).
Mark the current source-generated collection fast-path phase as done, split package ergonomics and broader generator coverage into future roadmap items, and sync the static roadmap pages. Refresh benchmark-facing docs with the current release-core snapshot, generated collection codec diagnostics, and root README performance tables including SQLite reference rows. Move CSharpDB.DataGen direct loads onto the write-optimized storage preset, reuse SQL row buffers before InsertBatch copies, document the fast-path choices, and cap direct collection document target sizes to stay within the current inline collection payload envelope. Validation: targeted generated collection tests passed; trim smoke publish and executable passed; DataGen Release build passed; relational and document direct-load smoke runs passed; git diff --check passed with only existing line-ending normalization warnings.
Teach row-goal planning to reorder eligible simple view join chains before the view operator tree is built. This lets bounded LIMIT/OFFSET queries over views use the same streaming lookup plans as equivalent inline SQL, including views whose original join order reaches an unindexed detail table late. Update the Admin DataGrid view path to page views with bounded LIMIT/OFFSET instead of opening unbounded forward-only view cursors. This keeps view tabs responsive when moving across pages and avoids forcing full-startup join plans for simple browsing. Restructure the shared DataGrid markup and query tab CSS so the row grid is the only scroll container and the pagination bar stays fixed below the rows. This removes the double-scrollbar/pager clipping issue in Query results while preserving table/view grid behavior. Add regression coverage for bounded simple-view row-goal planning, late unindexed detail joins, purchase-order style join chains, and DataGrid view paging SQL generation. Validation run: dotnet build .\src\CSharpDB.Admin\CSharpDB.Admin.csproj -c Release; dotnet test .\tests\CSharpDB.Admin.Forms.Tests\CSharpDB.Admin.Forms.Tests.csproj -c Release --filter FullyQualifiedName~DataGridTests; dotnet test .\tests\CSharpDB.Tests\CSharpDB.Tests.csproj -c Release --filter FullyQualifiedName~SimpleViewLateUnindexedDetailJoinWithLimit|FullyQualifiedName~JoinChainWithLimit|FullyQualifiedName~PurchaseOrderLineJoinChainWithLimit.
Promote the May 6 release-core benchmark artifacts in the release-core manifest and regenerate the benchmark README from that manifest. Sync the root README headline, durable API, concurrent write, and SQLite comparison tables to the new baseline. Also surface the latest focused insert fan-in diagnostic rows so the right-edge and auto-ID concurrent insert improvements are visible while still marked diagnostic until the release-core suite covers those shapes directly.
Expose SQL-first planner diagnostics through sys.planner_* virtual catalogs and EXPLAIN ESTIMATE FOR SELECT/WITH/compound queries. - add parser, tokenizer, AST, read-only classification, prepared-statement, and shared-memory handling for EXPLAIN ESTIMATE - materialize stable public projections for planner histograms, heavy hitters, and composite index prefix stats - add bounded planner estimate diagnostics for stats freshness, lookup/filter estimates, index choices, hash build-side selection, and join reorder decisions without polluting normal select planning - wire Admin Query tab Estimate action and Plan tab rendering for diagnostic rowsets - add parser/catalog/planner/client/HTTP tests plus benchmark coverage for planner diagnostics - document how to read Plan output, debug missing/stale stats, and identify likely query-planning red flags Validation: - dotnet build .\CSharpDB.slnx -c Release --no-restore - dotnet test .\CSharpDB.slnx -c Release --no-build
Add the phase-one adaptive query reoptimization surface behind DatabaseOptions.AdaptiveQueryReoptimization, keeping default query behavior unchanged. Direct embedded hosts can opt in through EnableAdaptiveQueryReoptimization, and ADO.NET direct embedded connections can use Adaptive Query Reoptimization=true when explicit DirectDatabaseOptions are not supplied. Remote endpoint connections reject the key so hosts enable the feature server-side. Wire adaptive options through Database, ReaderSession, QueryPlanner, and direct connection pooling. Add internal diagnostics for eligible queries, attempts, successful switches, rejected switches, divergence events, buffered rows, and fail-closed fallback reasons. Add adaptive join wrappers for the current v1 scope: - index nested-loop joins can buffer the outer side and switch to hash join before emitting rows when observed outer cardinality diverges - inner hash joins can flip the build side before emitting rows when the planned build side is materially larger than estimated - unsupported or risky shapes keep the original plan Keep plan caches value-agnostic and suppress adaptation for unsupported shapes such as compound query children, correlated subquery execution, cross/right joins, and SELECT * cases where visible column order could change. Add focused engine/operator tests, ADO.NET option tests, and an AdaptiveReoptimizationBenchmark diagnostic suite. Update benchmark docs, roadmap, and query-performance guidance to document phase-one behavior, expected workload-shaped gains, and future runtime actuals / EXPLAIN ANALYZE work.
Add a BenchmarkDotNet WAL point-read benchmark that measures primary-key reads across WAL-backed and checkpointed states for 100, 1k, 5k, and 10k target frames. Teach Compare-Baseline.ps1 to compare a configurable time metric per check or override via metricColumn, while keeping Mean as the default and surfacing the selected metric in console and markdown reports. This gives the WAL stress investigation a stable micro signal and lets sub-microsecond WAL latency rows be evaluated on latency metrics such as P95 instead of only Mean/throughput-derived behavior. Verified with: dotnet build tests/CSharpDB.Benchmarks/CSharpDB.Benchmarks.csproj -c Release --no-restore; Compare-Baseline.ps1 parser smoke; temp P95 metric-column smoke; dotnet run -c Release --project tests/CSharpDB.Benchmarks/CSharpDB.Benchmarks.csproj -- --micro --filter *WalPointReadBenchmarks* --job Dry
Propagate SQL result column types through the engine transport, HTTP API/client DTOs, and admin data grid so view/query result metadata is preserved across local and remote execution paths. Improve lookup-join planning by using indexed local predicate estimates when cardinality stats are unavailable or weaker, preserving right-side local predicates as residual join filters, and passing estimated row counts into index scans as capacity hints. Add an orders(customer_id) lookup index to the fulfillment sample schema for customer-filtered order views. Cover the behavior with integration tests for right-side join predicates and unique-text-filter lookup joins, plus a client SQL execution test for returned column types. Verified with focused dotnet test coverage for the two lookup-join tests and ExecuteSqlAsync_ReturnsQueryColumnTypes.
Replace RELEASE_NOTES.md with a single version3.7.0 section covering planner observability, adaptive reoptimization, paged view planning, SQL result metadata, DataGen close-out, and benchmark updates. Add docs/releases/v3.7.0-pr-notes.md using the repository PR template, with summary, scope, validation, and reviewer notes derived from b416b21..HEAD. Verified with: git diff --check -- RELEASE_NOTES.md docs/releases/v3.7.0-pr-notes.md
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.
Summary
This
version3.7.0release completes the current optimizer and async I/Oclose-out work, adds public planner observability, introduces opt-in adaptive
join reoptimization, and fixes the view/query paths that motivated the
customer-filtered fulfillment investigation.
The query-planning work adds
EXPLAIN ESTIMATEandsys.planner_*diagnosticcatalogs, then exposes those diagnostics in the Admin Query tab. It also adds
phase-one adaptive join reoptimization behind explicit opt-in settings so
eligible index nested-loop and hash joins can correct bad cardinality
assumptions before rows are emitted while default query behavior remains
unchanged.
The view/admin work makes paged view browsing use bounded
LIMIT/OFFSETplans, lets simple view row-goal planning reorder eligible join chains before
the view operator tree is built, fixes Query tab grid scrolling, and preserves
SQL column type metadata across engine, API, client, and Admin result surfaces.
The release also closes the current generated collection fast-path and DataGen
direct-load phase, refreshes release benchmark docs and scorecards, adds
optimizer/async I/O close-out diagnostics, and adds a dedicated WAL point-read
benchmark plus configurable guardrail metric comparison for sub-microsecond
latency rows.
Type of Change
Related Issues
No issue numbers were linked for this release branch. Included work:
EXPLAIN ESTIMATE FOR SELECT, WITH,and compound queries.
sys.planner_*virtual catalogs for histograms, heavy hitters, andcomposite index prefix statistics.
DatabaseOptions,EnableAdaptiveQueryReoptimization(...), and direct embedded ADO.NETconnection strings.
risky shapes.
LIMIT/OFFSETSQL.right-side filters, and index scan capacity hints.
ColumnTypesthrough local engine transport, HTTP API,HTTP client, and Admin DataGrid.
orders(customer_id)lookup index.roadmap/static pages.
reduced direct-load row-buffer overhead.
release-core manifest with the May 6 baseline.
comparing latency columns such as
P95instead of onlyMean.Testing
dotnet build CSharpDB.slnxDbExceptionpaths)Validation reported across the commit range:
dotnet test .\CSharpDB.slnx -c Releasedotnet build .\CSharpDB.slnx -c Release --no-restoredotnet test .\CSharpDB.slnx -c Release --no-builddotnet run -c Release --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -- --optimizer-closeout --reprodotnet run -c Release --project .\tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -- --async-io-closeout --repropwsh -NoProfile .\tests\CSharpDB.Benchmarks\scripts\Run-Perf-Guardrails.ps1 -Mode releasePASS=187, WARN=0, SKIP=0, FAIL=0.dotnet build .\src\CSharpDB.Admin\CSharpDB.Admin.csproj -c Releasedotnet test .\tests\CSharpDB.Admin.Forms.Tests\CSharpDB.Admin.Forms.Tests.csproj -c Release --filter FullyQualifiedName~DataGridTestsdotnet test .\tests\CSharpDB.Tests\CSharpDB.Tests.csproj -c Release --filter FullyQualifiedName~SimpleViewLateUnindexedDetailJoinWithLimit|FullyQualifiedName~JoinChainWithLimit|FullyQualifiedName~PurchaseOrderLineJoinChainWithLimitbuild, relational direct-load smoke, and document direct-load smoke.
dotnet build tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -c Release --no-restoredotnet run -c Release --project tests\CSharpDB.Benchmarks\CSharpDB.Benchmarks.csproj -- --micro --filter *WalPointReadBenchmarks* --job DryJoin_WithWhereOnRightPrimaryKeyLookupSide_AppliesPredicate,Join_WithUniqueTextFilterAndIndexedDependentSide_UsesLookupJoins, andExecuteSqlAsync_ReturnsQueryColumnTypes.Checklist
Notes for Reviewers
unchanged unless a host enables the feature.
remote hosts must enable the feature server-side.
EXPLAIN ESTIMATEandsys.planner_*are public diagnostic surfaces andshould stay isolated from normal select execution side effects.
and bounded browsing shapes.
ColumnTypesDTO addition is additive, but client/UI consumersshould handle missing values from older servers.
does not yet have a historical baseline captured as a guardrail.