Refactor/functional idioms and deps - #392
Open
ravituringworks wants to merge 36 commits into
Open
Conversation
Bump thiserror 1.0 -> 2.0 (major). Migration is source-compatible here:
all 26 derive sites use #[from]/#[error("...")] forms unchanged in 2.0,
no #[error(transparent)] or method-call format strings. Also convert the
six crates that pinned `thiserror = "1.0"` directly to
`thiserror.workspace = true` so the version lives in one place. Lockfile
also refreshed to latest semver-compatible transitive versions.
Workspace `cargo check --all-targets` green.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
rand 0.10 splits the RNG traits: the convenience methods (random, random_range, random_bool, fill, sample, sample_iter) moved to a new `RngExt` trait, while the core `Rng` trait (formerly `RngCore`, now deprecated) keeps fill_bytes/next_u*. Migration: - Method callers: `use rand::Rng` -> `use rand::RngExt` across ml (neural nets, transformers, industry models), server (postgres auth, aql, mongodb, protocol), compute benches, and orbit-util. - Byte-buffer fills (security/encryption, field_encryption): switch to the core `use rand::Rng` for fill_bytes. - `Rng::gen::<T>()` -> `random::<T>()` and the deprecated `choose_multiple` -> `sample` renames. - time_series_models uses Rng as a generic bound too, so imports both. Workspace `cargo check --all-targets` green, zero warnings. Note: compute/monitoring/windows.rs is cfg-gated to Windows and is verified by inspection here (not compiled on this host). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Bump the BDD/mocking dev-dependencies in both the workspace deps and tests/Cargo.toml. No source changes required: the #[given]/#[when]/ #[then] step macros, World derive/run, and mockall predicates are source-compatible across these versions. Pulls in transitive derive_more 2.1 / gherkin 0.16. orbit-integration-tests `cargo check --all-targets` green. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
pyo3 is optional and gated behind orbit-ml's `python` feature. The only usage is `MLError::Python(#[from] pyo3::PyErr)`, which is unchanged in 0.29. Verified with `cargo check -p orbit-ml --features python`. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
First increment of the incremental functional-style refactor, on the highest-leverage module (orbit-shared error handling). Behaviour is preserved; verified by the existing 12 tests plus 5 new ones (17 total, all green). - Independent generic type params on the paired constructors (configuration_with_key, internal_with_context, io_with_source, parse_with_input, parse_with_position, storage_with_operation, auth_with_user) so callers can mix &str and String instead of being forced to a single Into<String> type. - SecurityValidator: replace per-call pattern arrays with module-level consts, and the imperative for/return loops with an iterator-combinator helper (reject_if_contains). String and &str now delegate to shared pure functions, removing the &str path's needless to_string() alloc. - Add tests: mixed-type constructors, &str validation, matched-pattern naming, boundary/empty-input edge cases, and str/String agreement. orbit-shared: cargo test (17 error tests) green, clippy clean, fmt clean; workspace check green (widened signatures are backward compatible). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
…types Second refactor increment, on the core addressing types. Purely additive and behaviour-preserving (existing 13 tests untouched, 4 new = 17 total, all green; clippy + fmt clean). - `From<&str>`, `From<String>`, `From<i32>`, `From<i64>` for `Key`, plus `Key::string/int32/int64` constructors and `Key::is_no_key()`. - `AddressableReference::new(type, impl Into<Key>)` — build a reference from a &str/String/i32/i64/Key without a struct literal. - `NamespacedAddressableReference::new(..)` and a `Display` impl (`namespace/type:key`) for parity with `AddressableReference`. Applies the "conversions via traits" / `impl Into<_>` idioms from the Code Design Principles so call sites can drop the verbose enum-struct literals. Existing struct-literal construction still compiles. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Third refactor increment, replacing imperative accumulation with
iterator combinators. Behaviour-preserving (existing 7 tests untouched,
1 new = 8 total, all green; clippy + fmt clean).
- get_events_by_type: `let mut result = Vec::new(); for .. { result.extend }`
becomes a single `values().flat_map(..).collect()`.
- rebuild_state: the two branches each ran an identical
`for event in events { state = apply_event(state, &event)? }` loop.
Collapse to computing the replay start sequence once (Option::map over
the snapshot) and a single point-free `events.iter().try_fold(initial,
apply_event)`, removing the duplication and the `mut state`.
- Add a test pinning try_fold's short-circuit: an apply_event error now
propagates out of rebuild_state.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fourth refactor increment. Behaviour-preserving (5 existing tests
untouched, 1 new = 6 total, all green; clippy + fmt clean).
- Pattern compilation: `let mut v = Vec::new(); for .. { v.push(Regex::new
(..)?) }` becomes `patterns.into_iter().map(..).collect::<Result<Vec<_>,
_>>()?`.
- Attack detection previously coupled the attack type and confidence to
each pattern's array index via `match i { 0 => .. }` and
`0.8 + i*0.05`. Store `(attack_type, confidence, regex)` tuples instead
so the classification data lives next to the pattern, and detect with a
single `iter().find(|(_, _, re)| re.is_match(input))`. Same types and
confidences (0.80/0.85/0.90/0.95), same first-match semantics.
- Add a test asserting xss_attempt and path_traversal classify correctly.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Fifth refactor increment. Behaviour-preserving (existing 3 tests green;
clippy + fmt clean).
Both get_entries_by_transaction and get_entries_by_time_range built their
result with `let mut entries = Vec::new(); for row in rows { entries.push
(self.row_to_persistent_entry(row)?) }`. Replace each with the fallible
collect idiom `rows.into_iter().map(|row| self.row_to_persistent_entry
(row)).collect()`, which propagates the first conversion error identically.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Sixth refactor increment, first in orbit-engine. Behaviour-preserving (11 existing query::execution tests kept, 2 new = 13 green; clippy + fmt clean). execute_projection built three parallel accumulators with a single `for &idx in column_indices` loop that also bounds-checked and conditionally pushed column names. Refactor: - Validate indices up front (`iter().find(|idx| idx >= len)`) so the projection body is infallible. - Build columns/null_bitmaps with `map(..).collect()` inlined into the ColumnBatch literal (field types drive inference). - Carry column names with `as_ref().filter(|_| !indices.is_empty()).map(..)`, preserving the original quirk that an empty projection drops names. - Add tests for the out-of-bounds error path and the empty-indices name-dropping edge case. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Seventh refactor increment. Behaviour-preserving (13 query::execution tests green; clippy + fmt clean). select_rows built two parallel accumulators in one enumerate loop, using the column index to reach into batch.null_bitmaps. Split into a fallible `columns.iter().map(select_column_rows).collect::<EngineResult<Vec<_>>>()?` and an infallible `null_bitmaps.iter().map(select_null_bitmap_rows) .collect()`, dropping the manual index (columns and null_bitmaps are 1:1 by the ColumnBatch invariant). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
… rules Extend the code design principles in CLAUDE.md, AGENTS.md and .cursorrules with four areas the existing guidance did not cover: - Modelling honesty: what a default asserts, clamps are not values, decorative parameters - Performance: measure -> attribute from the call tree -> fix in yield order -> re-measure like-for-like -> verify the feature still works - Allocation discipline for measured hot paths - Verification: a green build proves almost nothing; run it, exercise the path, audit enum/registry affordances, diff duplicated contracts Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
- Express every proto<->domain conversion as From/TryFrom so they compose with `?`, `.into()`, and iterator adapters; the *Converter structs stay as thin documented wrappers over the trait impls. - TimestampConverter::from_proto no longer falls back to Utc::now() for an unrepresentable timestamp. That default asserted "this happened now" and silently restamped malformed records with their decode time; it now returns OrbitError::Internal naming the offending seconds/nanos. Negative nanos are rejected instead of wrapping through `as u32`. - Add #[must_use] and `# Errors` docs to the public converter API. - Tests: replace the fallback-is-close-to-now assertion with an out-of-range rejection table, and cover the trait forms against the converter structs for every Key variant. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Introduce a `Cursor` struct to manage safe, bounds-checked reads of compressed buffers, eliminating manual position tracking and preventing panics on truncated or corrupt input. Key changes: - Add `Cursor<'a>` with methods for safe primitives (`take_u8`, `take_varint`, `take_string`, etc.) - Add `XorBlock` to encapsulate Gorilla block validation - Refactor all three compressors (Delta, DoubleDelta, Gorilla) to use `Cursor` instead of manual offset tracking - Remove old `decode_varint` and `decode_varint_signed` functions - Add `capacity_for()` to prevent huge allocations from impossible counts - Simplify error messages and use inline formatting - Add three new security-focused tests: truncation, corruption, and impossible widths
min_bytes is a per-format constant today, but dividing by a caller-supplied value that could be zero is a panic waiting for the next caller. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Expose patterns module and refactor many pattern examples in orbit/shared: convert serialization from a trait to a Serialization enum with generic serialize/deserialize, add a simple RunLengthCompression, introduce Default impls for several helper types, tighten error mappings in conversions, fix interior mutability and RAII guard tests (use Arc+Atomic flags), clean up visitors/iterators/phantom-types code and tests. Large Cargo.lock changes: dependency updates and additions (tokio, rustls, hyper, reqwest, redis, rand, quinn, tower, etc.). These changes improve ergonomics, remove object-safety issues, and refresh dependencies.
Replace conditional division checks with idiomatic checked_div() in interior_mutability and compression modules for safer, more expressive code. Also extract FallibleMapper type alias for clarity, convert test vectors to array literals for efficiency, and adjust documentation style in typestate from doc comments to implementation comments.
Implement Default trait for types that have parameterless constructors. This follows Rust conventions where types with new() should derive/implement Default. Affected types: Observable, EventLogger, DatabaseConnection<Uninitialized>, ConfigBuilder<Incomplete>, SqlGenerator, QueryOptimizer, QueryValidator, CostEstimator. Also fixes minor formatting issues (line breaks, brace positioning).
cargo clippy --fix had already added these; keep one impl per type. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
orbit/shared/src/patterns/ is now compiled (pub mod patterns; in lib.rs), so it belongs in the module reference. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Introduces orbit-llm workspace crate with provider abstraction, retry policy, circuit breaker, and error handling for multi-provider LLM integration. Refactors Orbit Desktop to use persistent sessions instead of per-query connections, adds cluster lifecycle management (start/stop/status via scripts/start-cluster.sh), and replaces trait-based connection handling with async-trait for cleaner protocol support. Includes AI/LLM roadmap and competitive analysis documentation. Changes enable runtime model switching, fallback chains, and preparation for semantic caching and auto-embedding features.
Make stored connection timestamps optional and more robust in the desktop storage: created_at is now Option (RFC3339) with safe parse that warns on unreadable stamps; last_used likewise parsed safely; password decryption failures are logged and dropped instead of failing; ConnectionType parsed via FromStr; added cluster_root setting and derived Clone for StorageManager. Add a new llm configuration module (orbit/llm/src/config.rs) implementing provider configs, model profiles, pricing, env-layering per 12‑factor, validation, defaults, and tests (OpenAI/Anthropic/Ollama/Compatible flavors, timeouts, retries, breakers).
RFC 5802 defines the nonce alphabet as printable ASCII excluding comma (%x21-2B / %x2D-7E). The comma is the field separator in `r=<nonce>,s=<salt>,i=<iterations>`, so a comma inside the nonce splits the message into an extra field and the client rejects the handshake with a parse error such as "expected `s`". The nonce was drawn from the full 33..127 range, so at 16 characters roughly one login in six contained a comma and failed intermittently. Draws from a 93-character alphabet and shifts past the comma, with a test asserting the generated nonce never contains one.
Reworks the Tauri desktop client: - New ClusterPanel component and cluster.rs backend command surface - Connection management rewritten across connections.rs, ConnectionDialog, and ConnectionManager - Query formatting extracted into utils/queryFormatter.ts, with the safety test suite reworked against it - Encryption, storage, and model types updated to match - Dependency bumps in package.json / package-lock.json - dist/ rebuilt (index.html now references index-CuG3nLo2.js)
Completes the crate whose first half landed in cae34bc (that snapshot had no lib.rs and could not build). Adds the registry, router, providers, usage accounting, HTTP layer, and legacy compat shim. A model gateway inside the database process: unified API over four wire shapes covering ~15 named services, named model profiles switchable at runtime, fallback chains, retries, circuit breaking, timeouts, and cost accounting — without a separate deployment, and with retrieval, vector index, and generation sharing one process and one security boundary. Layout: - provider.rs / providers/ LlmProvider + EmbeddingProvider traits and the OpenAI, Anthropic, Ollama, and generic OpenAI-compatible implementations - registry.rs named, hot-swappable ModelProfiles - router.rs timeout -> retry -> breaker -> fallback -> accounting; providers do HTTP shaping only, so resilience is identical across backends - usage.rs token/cost/latency counters - http.rs one pooled reqwest client - compat.rs graphrag::LLMProvider -> ModelProfile Fixes carried over from the hand-rolled GraphRAG clients this replaces: - Anthropic worked at all. It previously returned Err("Anthropic client not yet implemented") for a provider the config enum advertised. - temperature/max_tokens reach the wire. The old factory accepted them, bound them to `_`, and discarded them; the caller compensated by matching the enum a second time. - One pooled HTTP client instead of Client::new() per request, which rebuilt the connection pool and TLS session on every call. - Bounded per-attempt timeouts. A hung provider could previously pin a database query open indefinitely. - Credentials are SecretString; Debug, Display, and Serialize redact. Modelling honesty, enforced by the types: - Token counts are Option. Most local servers report nothing, and unwrap_or(0) would assert a request used no tokens. - Cost is Option, computed only from configured prices. No price table is bundled: one baked into a database binary goes stale silently and then reports confident wrong costs. - A fallback that fires is logged, counted, and named in the response. 160 tests, including request-body shaping asserted against each vendor's documented format and an in-process stub that exercises the router's retry, breaker, and failover paths deterministically. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Wires orbit-llm into the server behind one shared runtime, so a model
registered or switched through any surface is visible to all of them.
- server/src/llm/ bootstraps the registry from the [llm] config
section, layered under LLM_* env vars, plus
well-known credentials (OPENAI_API_KEY,
ANTHROPIC_API_KEY, OLLAMA_MODEL) so an existing
deployment keeps working with no config file
- resp/commands/llm.rs LLM.PROVIDERS, MODELS, INFO, REGISTER,
UNREGISTER, USE, GENERATE, EMBED, STATS
- graphrag/llm_client.rs now a thin adapter over the router
Removes from GraphRAG:
- the double `match` over LLMProvider that re-derived temperature and
max_tokens because the client factory discarded them
- std::env::var("OPENAI_API_KEY") read inline in a RESP handler with a
hardcoded "gpt-4" that no deployment could change
Also fixes GRAPHRAG.QUERY, which built a fresh actor and discarded the
configured one, leaving the query with no model.
Verified against a live Ollama daemon over the Redis wire protocol:
LLM.REGISTER -> LLM.USE switched the answering model from llama3.2 to
granite4.1:3b with no restart; a primary pointed at a dead port failed
over and reported fallbacks_used; the breaker opened after six failures
and rejected without dialling; GRAPHRAG.QUERY used the switched
profile. The Anthropic path was reconciled against the real API, which
returned `authentication_error: invalid x-api-key` — confirming URL and
both headers against the live service rather than our expectation.
The Python SDK gains the nine matching llm_* methods.
Note: LLM counters are readable via LLM.STATS but are not yet exported
to Prometheus.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
industry_models is not implemented. It is roughly 470 `// TODO: Implement` method bodies across seven verticals — healthcare, fintech, adtech, defense, logistics, banking, insurance — with no training, no inference, and no tests behind them. Shipping that in a default-on crate advertises capability that does not exist, which is a modelling-honesty failure at the package level: it inflates the apparent surface area, cannot be tested, and any caller who reaches it gets silence or a default. Gates the subtree behind `experimental-industry-models` (default off; each per-vertical feature implies it), corrects the crate-level docs to say it is scaffolding, and adds a test asserting a default build does not advertise it. Reversible, and it stops the overclaim now. Deleting and reintroducing verticals one at a time with tests remains the better end state. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Fallout from `make format`; no behavior change. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
specifications/COMPETITIVE_ANALYSIS.md — competitor landscape across six tiers and a feature-by-feature fit-gap. Every "Orbit-RS today" claim was checked by reading the module, not the docs about it; capabilities that exist as scaffolding are marked Scaffold, not Yes. Findings that drove the LLM workstream: - SurrealDB 3.0 (GA 2026-02-17) is the direct threat: our architecture with a finished AI story, repositioned as AI agent memory - Inference moved inside the database boundary during 2025-26 - The model gateway became a required component, with a normalized feature list any LLM-calling product is now measured against - orbit/ml carries 470 stub bodies in 31k LOC (addressed in 008cccc) specifications/AI_LLM_ROADMAP.md — eight decisions recorded with reasoning and reversal cost, milestones M1-M8. M1-M5 are built; M6 (streaming), M7 (semantic cache over the in-process HNSW index, plus per-tenant budgets), and M8 (auto-embedding on write) are specified only, and say so. §4 records what verification actually ran rather than what was planned, including the defect it found that the green build hid: `[llm] enabled = false` was ignored, so the kill switch registered every profile anyway — a decorative parameter shipped by the author of the warning about decorative parameters. PRD.md — adds the orbit-llm module reference and the LLM.* command surface, and corrects the feature matrix: `Machine Learning | Complete` now reads Partial for the core and Scaffolding for the verticals. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Implement extended-query support and integrate the SQL engine into REST. Postgres wire: store Parse parameter OIDs, answer Describe with ParameterDescription and RowDescription, decode binary parameters on Bind, substitute parameters safely, and execute using the bound query (avoid re-sending row description). Query engine: add statement/column descriptions, parameter type inference, placeholder neutralisation, and probing for read-only statements. REST: expose a run_sql path backed by QueryEngine (with timeouts, limited rows, and clear error codes) and add server hooks to attach the engine. Add desktop integration tests and many unit tests for the extended protocol behavior.
Enable TLS across desktop and server: install a rustls crypto provider, add ssl_mode parsing, tokio-postgres-rustls integration, rediss support and an accept-any-cert verifier for `require`. Fix PostgreSQL listener to negotiate SSLRequest correctly and preserve startup bytes. Wire REST SQL handlers to the same QueryEngine/storage as Postgres and replace canned catalogue/stats responses with real listings, uptime and measured fields. Fix SQL parser uppercasing bug (preserve string literals). Add Makefile desktop targets, config defaults/serde fixes and a shipped-config test. Update Cargo files for TLS deps.
Record session transaction state (Idle/Open/Failed) and report it in ReadyForQuery; poison transaction on statement failure and recognise BEGIN/COMMIT/ROLLBACK. Add fold_identifier to normalize unquoted identifiers to lower case (preserve quoted case) and update query parsing/column normalization to use it. Add a tokio-postgres based pg_conformance integration test and required test deps (tests/Cargo.toml). Cargo.lock updated (futures crate versions/checksums bumped). These changes fix protocol mismatches between simple/extended paths and improve driver compatibility.
Add a NotificationHub and per-session channels to implement LISTEN/NOTIFY (delivered while idle) and wire a single shared hub into the Postgres server. Implement COPY text mode (TO STDOUT / FROM STDIN) with streaming, error capture, and simple COPY state. Improve extended-protocol support: track portal result formats and statement column OIDs, correctly bind parameters with unquoted numeric/boolean literals, and support binary encoding for common types. Add transaction snapshotting for rollback (with warnings when restore fails), TRUNCATE support, EXPLAIN text plans, and richer parser fixes (NOT, BETWEEN, START TRANSACTION). Introduce sql/select_pipeline.rs to correctly apply WHERE → GROUP BY/aggregates → HAVING → DISTINCT → ORDER BY → OFFSET/LIMIT → projection to rows from storage (fixes many earlier silent-wrong-answer bugs). Fix literal handling (NULL vs 'NULL'), identifier folding, vector coercion, and other evaluator improvements (version(), current_* functions, IS/IS NOT). Make storage adapter accept booleans/floats as primary keys and ensure drop_table removes rows before schema. Update PRD and integration tests to reflect conformance checks and new features.
…12/212
Nothing was persisted. `UnifiedStorageIntegration` built a `MemoryBackend` on
both arms of its `use_memory_backend` branch, so the flag documented an
intention and selected nothing while the log said "persistent backend". Every
table and row served over the SQL protocols lived only in that process.
- Add `RocksDbBackend`, a `UnifiedStorageBackend` over a RocksDB database under
`<unified_storage.data_dir>/unified`, behind the `storage-rocksdb` feature.
- `UnifiedTableStorage` writes each table definition to a reserved
`__orbit_table_schemas` relation and keeps its in-memory map strictly as a
read-through cache, rather than as the record.
- Regression test `a_table_survives_a_restart` opens the store twice over one
directory; it fails if the backend is switched back to memory.
`UnifiedStorage::scan` truncated every unlimited scan at `max_scan_limit`
*after* reading all matching records, so the cap saved no memory and corrupted
the answer -- `SELECT COUNT(*)` on a 12,000-row table returned 10,000 and
reported success. It now refuses, naming the row count and the config key; an
explicit `LIMIT` is honoured as given. Default raised to 1,000,000, a runaway
threshold rather than an ordinary table size.
SQL engine and wire protocol fixes, each of which previously reported success
while answering incorrectly:
- One routing table: `execute_multiple_queries` splits the message and sends
each statement through `execute_query`, instead of the simple-query path
dispatching over the AST while everything else dispatched over statement text.
- `WHERE` was discarded by writes, so `DELETE FROM t WHERE id = 2` emptied the
table; `drop_table` removed only the schema, so the next `CREATE TABLE`
resurrected the rows.
- `UPDATE/DELETE ... WHERE a = 1 AND b = 2` compared `a` against the text
`1 AND b = 2` and matched nothing. Conjuncts are separate conditions now, and
an `OR` is refused rather than mis-read.
- Rollback is row-scoped. Undo restored a whole-table copy, so one session's
`ROLLBACK` destroyed rows another session had committed while the block was
open. Savepoints record undo-log extents.
- The parser consults the lexer's keyword table in reverse and accepts any word
PostgreSQL does not reserve; previously 393 keyword tokens were rejected as
column names.
- `parse_create_table`/`INSERT`/`DROP TABLE` unwrapped `find('(')` and panicked
the connection task, failing every later statement with "connection closed".
- Also: `SET n = n + 1` stored its own text, `INSERT ... SELECT` inserted
nothing, constraints were dropped by the schema round trip, unknown columns
returned NULL, `ORDER BY 1`/alias sorted by expression, correlated subqueries
were resolved once, `NULLS FIRST`/`NOT IN` parser branches could never fire,
`STRING_AGG` ignored its separator, quoted identifiers lost their case, and
aborted transactions accepted further statements.
- `select_pipeline` gains window functions and runs FROM-less selects over one
empty row, so they share the single path.
- Binary `COPY`, `SET`/`SHOW`, and `SET CONSTRAINTS` are implemented.
Verified beyond the harness against a running server: durability across
restart, crash safety under SIGKILL, Redis/MySQL/CQL protocols on the shared
backend, 8x100 concurrent inserts, and a walsender session reaching `XLogData`.
Note `unified_storage.data_dir` is a separate setting from the `--data-dir`
flag, which the unified store does not read.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Add PL/pgSQL interpreter and stored-function subsystem; implement legacy fast-path FunctionCall handling. Implement per-session cancel support (CancelRequest) with task-local cancel flags and periodic checks. Improve logical replication: durable/batched change log, pgoutput framing (Begin/Commit grouping), binary output option, slot invalidation bound (configurable max_slot_change_backlog). Add numeric/decimal column support, JSON/bytea/interval/uuid casts, precise arithmetic/aggregate handling, and composite/array type handling and OID stability. Classify SQLSTATE codes and surface correct codes. Performance fixes: LIKE regex cache, LIMIT short-circuiting, yield in large scans, and various parser/engine fixes and bug fixes across postgres wire, query engine and catalog.
Add durable RocksDB defaults and configuration plumbing, enable lz4/zstd codecs, and use a shared WriteOptions so sync_wal/enable_wal are enforced. Set sync_wal=true default, enable paranoid_checks and point-in-time recovery, add compression enum and RocksDbBackendConfig, and surface warnings. Add durability and crash tests (including SIGKILL integration). Wire durability into server config and unified storage. Fix many Postgres protocol bugs: CSV COPY, empty statements, parameter type inference, binary result types on demand, transaction error code, statement splitting, COPY parsing, UPDATE expression evaluation/order, NUMERIC rendering, ALTER TABLE ADD COLUMN, unique index handling, portal paging, joins, and other robustness fixes. Update PRD.md and tests; update .gitignore.
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.
No description provided.