feat: stabilize adaptive background indexing runtime#15
Merged
Conversation
…improve validation
… sorted indexes This update enhances ColQL v0.7.0 by implementing conservative auto scheduling for eligible large dirty sorted indexes while maintaining synchronous public query APIs. Equality indexes and small sorted indexes continue to prefer synchronous rebuild behavior. The `query.explain()` method now includes diagnostics for background rebuild eligibility and scheduling decisions, improving overall query performance and diagnostics.
Merging this PR will improve performance by 31.7%
|
| Benchmark | BASE |
HEAD |
Efficiency | |
|---|---|---|---|---|
| ⚡ | background/sorted/numeric-encode-merge/10k |
50.4 ms | 38.3 ms | +31.7% |
Tip
Curious why this is faster? Comment @codspeedbot explain why this is faster on this PR, or directly use the CodSpeed MCP with your agent.
Comparing v0.7.0_prepare_new_version (b7e42c8) with main (1eb57e6)
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 PR finalizes the v0.7.0 adaptive background indexing runtime work.
The focus of this release is not new query APIs, but runtime maturity:
The public query API remains synchronous.
Key Changes
Adaptive Background Scheduling
Added internal auto scheduling for dirty indexes.
Current behavior:
No public indexing config was added in this release.
Sorted Background Rebuild Optimization
Optimized the sorted apply/merge pipeline:
10M Benchmark
Before:
After:
Worker Runtime Stabilization
Observability Stabilization
Expanded and stabilized additive observability surfaces:
QueryInfo / explain()
Table-level diagnostics remain intentionally internal (
__debug*).Benchmark Highlights
100k rows
1M rows
Sorted:
10M rows
Equality:
Sorted:
Important Runtime Philosophy
Background indexing is intentionally narrow.
It is designed as:
It is NOT:
Validation
Passed:
Known Limitations