CortexDB · docs

CortexDB 0.12.0 — a full disk or full memory no longer kills the server, and old data can move to an object store

0.12.0 is a feature release on top of 0.11.0. Everything in RELEASE_NOTES_0.11.0.md (and the notes before it) still applies; this page lists what changed since.

Upgrading from 0.11.0 is reversible as long as you do not turn on the two new opt-in features that move data: a keep_learned retention rule and the segment store (CORTEX_ICE_URL). Both write log entries of shard apply format 6, which 0.11.0 cannot read; take a cold backup before turning either on. Nothing else changed in the log or the replicated state, and the one-click updater's one-way boundary stays at 0.11.0.

Getting 0.12.0. This release is for pilots and customers: download it from https://customer.cortexdb.ai (the Linux amd64 and arm64 tarballs, a docker load image file per platform, and the image in the private registry it names). It is not on Docker Hub or the public GitHub releases, so the console's "Update now", which pulls from Docker Hub, does not install it: upgrade by hand. A 0.12.0 server checks https://customer.cortexdb.ai/api/latest-version for newer releases.

For clients nothing is removed: the routes, the request and response shapes and the capabilities are 0.11.0's, plus the additions below. The published clients need no release.

Summary

Disk

At 95% used or under 4 GiB available (CORTEX_DISK_CRITICAL_PERCENT, CORTEX_DISK_CRITICAL_FREE_MB; warn at CORTEX_DISK_WARN_PERCENT, 85%) every command that adds data (a capture, a bulk chunk, an import, a tenant map) is refused before it is proposed, writing nothing: 503 DISK_FULL, retriable, Retry-After: 30, details.node naming the node. Forgets, erasures, retention and cancels are never refused. The enrichment scanner, the auto layers, the artifact workers, the compaction pass and snapshot saves pause at critical and resume on their own. /v1/admin/ready stays ready: true and sets degraded; /v1/admin/metrics disk, GET /metrics cortexdb_disk_* and a cluster node's /node/v1/status disk report it. CORTEX_DISK_GUARD=off only reports.

Memory

Running several servers on one host without containers: give each CORTEX_MEMORY_LIMIT_MB, or every one sizes itself from the whole host.

The segment store (opt-in)

Set CORTEX_ICE_URL (an s3://, gs://, az:// or file:// URL; CORTEX_ICE_ENDPOINT, CORTEX_ICE_REGION and the CORTEX_ICE_* credentials for S3-compatible stores) and CORTEX_ICE_KEY_FILE, a node key that cortexdb ice-key --out FILE makes. Keep the key file with your backups: losing it loses every sealed event.

Not yet: the cross-scope ranked subtree recall does not search segments (its response says subtree_segments_not_searched), and a root's many small segments are not merged.

Retention: keep_learned

PUT /v1/admin/retention/policies takes mode: keep_learned (the default for a rule stored without one) or erase. Under keep_learned the sweep removes each expired event's raw data and keeps an expired marker and everything learned from it, which recall, citations and /v1/beliefs/why keep serving; with enrichment on, an event not yet learned from is learned from first, within a daily budget. erase removes both, as every rule did before. A rule stored before this release, and the deployment default, mean erase unless CORTEX_RETENTION_DEFAULT_MODE=keep_learned; along a scope path erase wins. /v1/erasures still removes everything, expired markers and what was learned included. The Python SDK and the CLI take the mode in their next releases; the HTTP API takes it now.

Clusters

Environment variables

New: CORTEX_DISK_GUARD, CORTEX_DISK_{WARN,CRITICAL}_PERCENT, CORTEX_DISK_CRITICAL_FREE_MB, CORTEX_DISK_CHECK_INTERVAL_SECS, CORTEX_VECTOR_RAM_FRACTION, CORTEX_VECTOR_RAM_RESERVE_MB, CORTEX_VECTOR_EVICT_BATCH_PER_TICK, CORTEX_MEMORY_LIMIT_MB, CORTEX_MEMORY_PRESSURE, CORTEX_MEMORY_PRESSURE_{HIGH,LOW,INTERVAL_MS,SHED_FRACTION}, CORTEX_ROCKSDB_MEMORY_MB, CORTEX_RETENTION_DEFAULT_MODE, CORTEX_ICE_URL, CORTEX_ICE_KEY_FILE, CORTEX_ICE_KMS_{KEY_ID,REGION,ENDPOINT}, CORTEX_ICE_TARGET_PERCENT, CORTEX_ICE_HOT_DAYS, CORTEX_ICE_SEGMENT_MB, CORTEX_ICE_READ_{DEADLINE_MS,MAX_MB,MAX_REQUESTS}, CORTEX_ICE_CACHE_{GB,MB} and the store's CORTEX_ICE_* credentials. Changed: CORTEX_VECTOR_RESIDENT_MAX unset now means auto (set off for the old behaviour). docs/generated/env-vars.md describes each.

Error and exit codes

New: DISK_FULL and MEMORY_PRESSURE (503, retriable, with Retry-After); SEGMENT_UNAVAILABLE (503, retriable) on event reads; ICE_OFF (409) and ICE_FAILED (503, retriable) on the ice routes; the warnings segments_unreachable and subtree_segments_not_searched; boot exits 78 MEMORY_CONFIG, ICE_CONFIG, ICE_REQUIRED, ICE_KEY_MISMATCH and ICE_RESTORE_REPLAY.

Measurements

Soaks on spot machines, mock embeddings, no paid API (docs/RESOURCE_GUARDS_PLAN.md and docs/ICE_TIER_PLAN.md, "Soaks"): a server filling a 10 GB disk now keeps serving every read instead of dying; with the segment store on over an S3 API it wrote 161,800 items, served every read (p50 350 ms, p99 1.3 s) and found 100% of recent and 99.94% of old items while sealing 86,655 events; RF=3 clusters with the segment store on passed an hour and half an hour of leader kills, partitions, replacements and moves with every operation linearizable.

Known issues

Clients

No client release is needed: every new error is a retriable 503 or an opt-in route the clients already handle. The Python SDK's and CLI's retention mode option ships with their next releases.