1 개월 전 | 이 릴리스 이후로 27 main에 커밋합니다.
Bug-fix release, server only: the client library, -dev and CLI stay at 2.20.0. The on-disk format is unchanged; 2.17.2 was tested booting a data directory 2.20.1 had written.
[server] ⚠ A snapshot held the whole store in memory twice more: the serialised body, a compressed copy beside it, and a copy of each collection's documents. A store that outgrew its host was OOM-killed at every snapshot, the WAL was never truncated, and recovery grew with it until the server could no longer boot. The writer now streams to disk a chunk at a time; a snapshot adds a few tens of MB to memory whatever the store's size. The file format is unchanged (older servers read the new files and the reverse). This removes the cause, not the failure mode: boot still holds the whole dataset in memory, so a large WAL left by anything else (a crash, a long stop, a full disk) can still keep a small host from booting (ROADMAP 5e).
[server] A snapshot that never finished (the process was killed while writing it) is reported at the next boot as an ERROR, with the WAL size and the age of the newest snapshot; a WARN whenever the WAL reaches twice the size that triggers a snapshot; and an INFO line at recovery naming the WAL size and the newest snapshot. Boot logs each step after the backfill.
1 개월 전 | 이 릴리스 이후로 29 main에 커밋합니다.
Out-of-cycle security release (owner-approved). Server and client packages are in apt (trixie).
std::regex, which backtracks: a caller-supplied pattern such as (a+)+$ could tie up a server thread far past the client's deadline on a single long value. Anyone with a read grant could trigger it, and also plant the row if they had insert access. Measured end to end with the old engine: a 5,001-byte value took a find past its 20 s deadline, and the server kept working after the client gave up. Filters now run on RE2, in time linear in the value, compiled once per query instead of once per row. Capability re2_regex_filters.invalid_pattern, fields = the filter field. Reading the reason on a read call needs a 2.17.0+ client.[áÁ] is one character, sz[áÁ]mfejt matches számfejt, and [öÖ] no longer matches unrelated accented text. (?i) works as a case-insensitive flag, including non-ASCII letters.invalid_pattern), because RE2 has neither. A view stored with such a pattern matches nothing; recreate it.Client::Capability::kRe2RegexFilters. No new library symbols.Tests: tests/load_test/test_regex_filters (39 checks). Reverting the handler refusal fails 7. Reverting the engine fails 8, then the backtracking query exceeds its deadline. Gate: ctest 26/26, e2e 26/26, compat 2.19.0 and 2.18.0 both directions.
1 개월 전 | 이 릴리스 이후로 32 main에 커밋합니다.
_expires_atAll four packages. Capability document_expires_at (for the filter part).
A TTL could be written (insert/upsert ttlSeconds, patchWithTtl, defaultTtlSeconds) and never read back. A backup compared with live looked like data loss when the sweep had simply reaped an expired row, and a restore could not carry the expiry, so expired rows came back PERMANENT (for an idempotency marker, it suppresses the work it guards forever). The server has always sent the expiry (Document.expires_at); the client dropped it.
get, find and exportCollection attach _expires_at (absolute, milliseconds since the epoch) when a document has an expiry; absent otherwise. This is client-side: a 2.19.0 client reads it from ANY server.restrict relation can hold a row beyond its TTL. A copy taken while the server is stopped keeps expired rows until a server opens it._expires_at absent -> insert without a TTL; in the past -> skip the row; otherwise ttlSeconds = ceil((_expires_at - now) / 1000).Filter::lt("_expires_at", t), Filter::exists("_expires_at", false). A document without an expiry is ABSENT for these (never 0), so an upper bound does not match permanent rows. Not a sort key._expires_at is a reserved name, stripped by the 2.19.0 server and by the 2.19.0 client (so a get-then-write round trip cannot store it on an older server either).test_document_expiry (18 checks: get/find/export carry it only where set, filters, count, patchWithTtl moves it, a read body re-inserted or updated does not store it, a 1 s row is reaped). Reverted alone: read 4 fail, filter resolvers 4, write strip (both sides) 2.libsmartbotic-db-client (>= 2.17.0).Client::Capability::kDocumentExpiresAt), soname 2.1 개월 전 | 이 릴리스 이후로 35 main에 커밋합니다.
smartbotic-db-cli configure (client-only release)Packages: libsmartbotic-db-client, libsmartbotic-db-client-dev, smartbotic-db-cli. The server stays at 2.18.0; nothing to restart. Take revision 2.18.1-2 (see below).
smartbotic-db-cli configure <collection> [--versioning on|off] [--max-versions N]: collection history administration from the operator's tool.
--versioning off stops recording NEW history (a config flag; no window needed). History already written stays.--max-versions N prunes existing history to the newest N versions per document. Writes that record history in THAT collection wait while it runs (measured: 3.9 s for a 56 MB history file, 10.3 s for 230 MB); other collections are unaffected.createCollection(existing, ...) re-applies every option, and a TTL of 0 would clear an existing default), leaves timestamp precision alone, refuses --max-versions 0 (that means UNLIMITED, not off), and prints what changed and how long the prune took. History file sizes are not visible over the API; compare <data_directory>/history/<collection>.hlog before and after.info always prints default_ttl_seconds, and marks max_versions 0 as unlimited.Depends is computed by dpkg-shlibdeps: libsmartbotic-db-client (>= 2.17.0) instead of its own version. Before, a CLI upgrade moved the library under every service on the host. The CLI stays dynamically linked on purpose: it keeps exercising the shared library.dpkg-gensymbols -c1), and a release cannot publish the library while the symbols file lacks new symbols.dpkg-shlibdeps / debhelper now get a computed floor for this library.test_collection_admin drives the real CLI (10 versions with TTL 3600, then configure --versioning off --max-versions 2: at most 2 versions, TTL kept, precision unchanged, later updates record no history). With the TTL pass-through and the precision guard reverted, 3 checks fail.1 개월 전 | 이 릴리스 이후로 37 main에 커밋합니다.
Behaviour change for range filters (GT/GTE/LT/LTE). Server-side; clients need no change. Capability typed_range_filters.
null, a boolean, an object or an array, or a value of the other kind than the bound, never satisfies a range. A null or boolean bound matches nothing. 5 and 5.0 are both numbers.null or true matched year <= 2025, and the string "1900" matched year >= 2025. A single bound silently over-matched. Nobody designed that ordering; it came from the JSON library. Found by a consumer whose access gate relied on a single bound.null exists), IN, CONTAINS, REGEX, SEARCH.EXISTS false selects it).null first and rows without the field last. Sort and filter still disagree about absent fields; bound a filtered, sorted list on both sides. (Open item in ROADMAP.)A range filter that returned null, boolean or wrong-typed rows returns fewer rows. Watch for filter values whose JSON type depends on their text: 2026.1 parses as a number and 2026.1.3 stays a string, and an empty interpolated value stays the string "", which now matches no numeric field.
test_typed_ranges (30 checks, every case on a scanned and an indexed collection, count, range + sort, sort order unchanged). Reverted alone: comparison rule 17 fail, index gate 2.Client::Capability::kTypedRangeFilters), soname 2.1 개월 전 | 이 릴리스 이후로 40 main에 커밋합니다.
Take this instead of 2.17.0 / 2.17.1.
_vector before the store extracted it, so EVERY insert carrying a vector into an encrypted=true collection was refused ("Invalid JSON ... type must be number, but is string"). The embedding is now never encrypted (similarity search compares its numbers); every other value still is. An encrypted collection inserts, searches, exports and re-imports vectors. Note an embedding can reveal something about its source text.createCollection(existing, encrypted=true) now requests a reseal only when it actually rewrote plaintext, and the reseal compacts only that collection's project. In 2.17.1 any flag change requested it, and it compacted every project (minutes on a large env that was never touched). The first boot's migration still compacts every project, once.maxVersions prunes in two streamed passes, outside the store's global lock.encryption-verify says when it is unsealed: CLEAN (UNSEALED: old plaintext copies remain on disk until the next restart) while a reseal is pending.storage.encryption.key_file is named in the startup error, instead of "data will be lost on restart".1 개월 전 | 이 릴리스 이후로 45 main에 커밋합니다.
Take this instead of 2.17.0. Every item came from consumers measuring a live 2.17.0 server.
encryption-verify no longer stalls writes. On a 2.17.0 server it read history under the global history lock, so every write that records a version (update, patch, upsert of an existing id, delete), in every collection, waited while a large history file was read: minutes for a 230 MB file, seen as Deadline Exceeded on unrelated collections. It now reads history with a lock-free scan. This is server-side: the server must be 2.17.1; a 2.17.1 CLI against a 2.17.0 server still stalls it.data.mdb. 2.17.0 moved the original aside, then renamed the compacted copy in; a kill between the two would have opened an empty env at the next boot. Now one atomic rename.info reports the encryption that is ENFORCED. 2.17.0 showed only the collection's own options; options declared on a bare alias name are enforced but were not shown, so a fully encrypted collection read encrypted: no. The CLI also prints versioning: on|OFF.project:_name collections are refused with INVALID_ARGUMENT, reason reserved_collection_name. Since 2.3.0 a write to such a name answered ok and could never be read back (kept in memory and the WAL, never in the on-disk store reads use). dropCollection still accepts such names so leftovers can be removed. A bare _name (global) is unchanged.createCollection(existing, maxVersions=N) with a lower cap now prunes the history already on disk, keeping the newest N versions per document. Before, the setting was accepted and nothing was trimmed, so history kept with maxVersions = 0 could never be cut back. Runs inside the call; a large file takes seconds.encryption-verify CLEAN means everything the rules require to be encrypted is encrypted, once, and decrypts. It does not mean nothing sensitive is in the clear: a secret under a non-sensitive name in a non-encrypted collection is invisible to it by design.info merge 1, prune 1.1 개월 전 | 이 릴리스 이후로 46 main에 커밋합니다.
Security fix. Upgrade, then rotate credentials stored before it.
encrypted=true encrypted nothing. The flag was stored and reported, and no code read it.sensitive_fields was stored and never used.password, secret, token, api_key, apiKey, credentials) matched only NESTED fields. A top-level password was stored in plaintext.patch and every migration-file write op never encrypted.encrypted=true collection encrypts EVERY non-null value. Strings become $ENC$.... Numbers, bools, objects and arrays become $ENCJ$... and read back with their original type.sensitive_fields paths are encrypted, and everything under them.openai_api_key, refreshToken and apiKeyHash do not match.encrypted_field, the fields named. Set ops are refused with FAILED_PRECONDITION. This covers:
These used to silently match nothing. The refusal is permanent; a retry cannot succeed. Since top-level sensitive names are now encrypted in every collection, a filter on a field named token or password is refused even in a non-encrypted collection. This includes user-authored queries, such as the smartbotic storage-query node, where workflow authors may filter on any name.
createCollection(existing, encrypted=true / sensitive_fields) now switches encryption ON for an existing collection. It can never switch it off. Rows and history are encrypted immediately, and the old copies are removed at the next restart.verifyEncryption() / smartbotic-db-cli encryption-verify [collection] (admin, capability encryption_at_rest):
Client::errorDetail(e). Before, the detail was dropped.FailureDetail& overloads of createIndex, createUniqueIndex, createCompositeUniqueIndex, createRelation, setAdd and setRemove. The original overloads cannot tell a refusal like encrypted_field from an outage.A bootstrap of the form "create the collection with encrypted=true only if it does not exist yet" never set the flag when an earlier write had already created the collection implicitly. One consumer found both its credential collections in that state, so the upgrade would have encrypted neither. Do not assume the flag is set: smartbotic-db-cli info <collection> shows encrypted: yes|no, and encryption-verify marks encrypted collections [encrypted]. To fix it, call createCollection(name, ..., encrypted=true) unconditionally; in 2.17.0 that switches an existing collection on.
Copies made BEFORE the upgrade still hold the plaintext: backups, pre-upgrade-* directories, nightly tarballs, replicas and disk blocks. Credentials stored before 2.17.0 should be rotated.
Each part of the fix was reverted alone and fails the test.
encryption-verify CLEAN and sealed.1 개월 전 | 이 릴리스 이후로 49 main에 커밋합니다.
A collection may now declare the shape of its documents, like a SQL table definition written as JSON Schema. It is optional per collection: a collection without a schema behaves exactly as before. Requested by the owner and, independently, by smartbotic-vectorapi.
db.createCollection("people");
db.setCollectionSchema("people", {
{"type", "object"}, {"required", {"name"}}, {"additionalProperties", false},
{"properties", {{"name", {{"type", "string"}, {"maxLength", 128}}},
{"nick", {{"type", {"string", "null"}}}}}}});
db.insert("people", {{"name", std::string(130, 'a')}});
// InvalidArgument, reason schema_violation, fields {"name"}:
// "'name' is 130 characters, longer than maxLength 128"
A JSON Schema subset:
type, including type arrays such as ["string", "null"].properties, required, additionalProperties, min/maxProperties.min/maxLength counted in characters, not bytes; pattern (RE2); format (date-time, date, email, uuid).minimum, maximum, exclusiveMinimum, exclusiveMaximum.items, min/maxItems, uniqueItems.enum, const.Every other keyword is refused when the schema is set (reason invalid_schema), so a schema never looks stricter than what is enforced. default is an annotation and is not applied to documents.
_vector are not part of it.A schema can be set, replaced or removed at any time.
getCollectionSchema returns the schema as set, its mode, and refusal/audit counters.suggestCollectionSchema scans the rows and returns a schema every scanned row conforms to: type unions, required keys, additionalProperties:false, detected formats, and small enums (never for a sensitive field). Lengths and ranges are described, not enforced.setCollectionSchema, removeCollectionSchema, getCollectionSchema, suggestCollectionSchema.collection_schema: against an older server they refuse with server_unsupported before sending. This is the first feature to use 2.15.0's capability check.schema, schema-set <c> <json|@file> [--audit], schema-drop, schema-suggest.schema_violation, invalid_schema and server_unsupported, all only where a schema or the new calls are used.libre2-11. It is already present wherever gRPC is.The built-in sensitive-field patterns (*.password, *.api_key, ...) match only NESTED fields, so a top-level password is stored in plaintext, and the patterns are not configurable. This is unrelated to schemas. It is recorded in the ROADMAP for its own release, because fixing it changes what existing installs encrypt.
test_json_schema (89).test_collection_schema: 56 checks, plus 5 after a restart. Encryption is on, and ciphertext is verified on disk.compat.sh passes in both directions against 2.15.0 and 2.14.0.Packages: apt trixie 2.16.0-1. The zeus container runs 2.16.0.
1 개월 전 | 이 릴리스 이후로 51 main에 커밋합니다.
Up to 2.14.0 the two were locked together, and a client could not tell what a server supported. From now on either side can be released alone, and the client refuses a call an older server would misread instead of sending it.
GetServerInfo RPC: returns the server's version, commit and a list of feature names. It currently lists 21 names, in service/src/server_capabilities.hpp.serverInfo() answers nullopt for a pre-2.15.0 server, and throws on an outage (an outage is not "an old server"). The answer is cached for 60 s.serverSupports(name), with Client::Capability constants for the names.FailedPrecondition, reason server_unsupported, BEFORE sending.sbdb-client-version metadata, so a server can keep an old behaviour for an old client.server-info.smartbotic-database package no longer pins libsmartbotic-db-client (= VERSION).packaging/build.sh --only client|server publishes one side.packaging/compat.sh <released-version> runs this tree's client against a released server, and the released CLI + library against this tree's server. Both directions pass against 2.14.0 and 2.13.1.smartbotic-db-cli package never declared liblmdb0 / libssl3t64, so installed without the server package the CLI could not start (liblmdb.so.0: cannot open shared object file). This affected every release up to 2.14.0.index-create refuses a flag as a collection or field name. index-create "users email" --unique used to declare a unique index on a field named --unique; two such declarations were found on zeus and have been removed.server_unsupported refusal, only for future features.similaritySearch now makes one extra GetServerInfo call per client per 60 s (cached).test_server_info: 35 checks with the server up, 1 with it down, 9 against old servers via compat.sh.Packages: apt trixie 2.15.0-1. Verified on Debian 13: the server package installs and runs with no client library present, and the CLI runs without the server. The zeus container runs 2.15.0.