Repository navigation
v0.1.1
TinyStore 0.1.1
What's new, with code in every language: https://tinyshed.org/tinystore/docs/releases/v0.1.1
bun add @tinyshed/tinystore@0.1.1
npm install @tinyshed/tinystore@0.1.1
pip install tinyshed-tinystore==0.1.1Built for linux-x64, linux-arm64, linux-x64-musl, linux-arm64-musl, darwin-arm64, darwin-x64, win32-x64. Each archive holds the
tinystore executable in bin/, and in lib/ the core's library and the Node addon; the Go
SDK fetches its platform's at the first open. SHA256SUMS checks them all.
Changes since v0.1.0
Changed names
What a program may have to change, or should know, before it upgrades:
- records: a 0.1.1 store migrates
records.dbat its first open (migration 0002, which keeps the order events of one time were appended in), and v0.1.0 refuses that file afterwards. - config: each explain line gains
given, every value a setting was given with where it came from as data. In Rustconfig::Linegains a field, andLine,Explainedand the newOriginare#[non_exhaustive], so a struct literal or an exhaustive destructuring of them in another crate no longer compiles. In TypeScript an object typedExplainLineneedsgiven, in GoLineholds a slice and no longer compares with==, and in PythonLineequality comparesgiventoo. - records: a store's logger takes
level: { store, console }beside one level, andLOG_CONSOLE_LEVELsets the console's part. Python'sstore.log_handler(level=...)is now the store logger's level, whichLOG_LEVELand the configlogmove, and a level TinyStore does not know, such as'CRITICAL', is refused. - bun, node: a field or a
with()context whose value isundefinedis left out rather than written as"undefined", and areplacethat returnsundefineddrops its field. - errors: a store's directory that is a file, or sits under one, is
invalidin Rust and every SDK, where it wasclosed,ioorinternal. A binary that cannot start isclosed, "cannot start the sidecar : ". Python's embedded open says an io failure asinternal, the wire's code. - bun, node: a cancelled call throws
CancelledErrorrather than the signal'sDOMException, andwithSignal, Python's cancel and Go'sctxnow stopopenandconnecttoo. - new names:
CancellationToken;queue.addingin a database's batch;max_series(maxSeries,MaxSeries,serve --max-series);stats.prometheus().ingest(ingestPrometheus);tinystore::aiobehind theasyncfeature; explain'sgiven,fromandOrigin;Levels;LOG_CONSOLE_LEVEL.
Features
- records: let a store's logger keep and print at levels of their own, level: { store, console }, set by LOG_LEVEL and LOG_CONSOLE_LEVEL, and move LOG-05 so that each LOG_ variable wins over its own part
- config: give each explain line the values it was given, each with where it came from as data
- aio: open a database's buckets, queues and table indexes from the async database, their calls awaited, and say every engine's calls are
- aio: await metrics' ingest, queries, pages and descriptions, and a backup's write, each read stopped by its future's drop and each write run to its end off the polling thread
- aio: await records' appends, reads, polls, drops and flushes, and walk all and a tail as streams
- aio: await search's indexes, their sets and deletes submitted under a hold of the rows their commit drops, their searches on the pool and a ready the index wakes
- aio: await blobs' files, their reads in the poll or on the store's pool, their writes committed off the polling thread and their memory waited for on no thread
- aio: await sql's databases, tables and queries, their reads stopped by a dropped future and their commits led off the polling thread
- aio: await jobs' queues, claims, steps and schedules, read a page or a watch as a stream, and run a worker as a future that until stops
- aio: await a config's changes and a lock's or a semaphore's hold, and read a config's watch and a channel's messages as streams, none waiting on the thread that polls
- aio: await kv's buckets, counters, rate limits, quotas and once, writes queued in their first poll, point reads in it when a reader is idle, pages on the pool
- aio: add tinystore::aio, the async api: its store, tx and close awaited, reads on the store's pool stopped by a dropped future, writes led off the polling thread, waits that park no thread
- metrics: read prometheus' text format and openmetrics into series, one parser in the core for every sdk
- sql: let a batch carry a queue's add, queue.adding, so a row and its job commit together and still group, every sdk
- sqlite: stop a read whose token is cancelled or timed out, and a query whose client cancels it
- sqlite: give records.db's and metrics.db's free pages back to the disk in maintenance, and vacuum a small file of 0.1.0 once
- metrics: let a store hold more than 100,000 series, max_series in its options, every sdk and serve
- release: list the commits since the last release in its notes
- check every engine's names alike and offer the nearest name a refused one could be
- sdk: add the tinystore command to the go sdk, the release's binary fetched once and run with its arguments
- sql: say that a migration's name ends with .sql when only its extension is missing
- store: say that a server holds the directory and how to stop it when its lock is taken
- cli: read a bucket or a queue a program opened from its database, in kv and the mcp tools
Fixes
- records: leave a field whose value is undefined out of a bun or node logger's line and of an appended event, as JSON.stringify and pino do, and let a replace that returns undefined drop its field (LOG-09)
- sdk: stop open and connect at the caller's own cancel and leave nothing behind, and let a store's close stop a dial under way, its waiting calls failing closed
- sdk: say why a store does not start: a directory that is a file is invalid in every way, a binary that is not there is named, and a sidecar that exits says what it wrote to stderr
- blobs: pass a folder's clear on a copy to its home, where it failed writing the copy's read-only file
- records: give events of one time in the order they were appended, across streams, late heads and merges, each block of version 3 keeping their arrivals and migration 0002 keeping v0.1.0 off the file
- records: read ahead under the caller's cancellation tokens, so that a cancel stops a count's threads where they read
- cli: give a windows server's SERVE, server folder and named pipe a protected dacl of its user alone, so that no other local user reads the secret or connects
- sql: answer a go transaction by its commit's answer rather than by a ctx that ended after it, and send no commit once a ctx or a signal has ended
- sdk: cancel a store's subscriptions, each loops, tails and watches at its close in bun, node and python, which kept a private child or a sidecar draining for ten seconds
- sdk: dial no connection after a bun or node store's close, which a call waiting on a failed dial started and nothing closed
- sdk: keep python's dial going for the next call when the call that started it is cancelled, so that close closes its connection
- kv: keep a go uint64 and uint as rust's u64 and a float32 as its f32, so that go and rust read each other's rows, and add their rows to the vectors
- sdk: wake a go call waiting for a free stream when one frees, not a call whose context gave up before it
- sdk: stop a go store's close from reading its stops while subscriptions that ended take theirs off, which could abort the process
- sdk: send a write again on the next connection when the connection was lost while its handle opened, in every sdk, where it said outcome_unknown
- sql: answer outcome_unknown for a transaction whose commit left and lost its connection or its wait, in every sdk, where it said closed
- sdk: keep a REQUEST a GOAWAY refused from leaving once credit comes back, which ended the connection under the streams the server was finishing
- replication: close a tls link whose handshake or hello trickles in past its bound, as a plain one is
- replication: name a commit a crash left past a copy's position only for the entry whose pages it holds
- replication: refuse a judged home's transaction that would commit after its lease ran out or another node took the file
- replication: close a link that shows no token in time or sends more than a hello before it, and hold few such links
- replication: refuse the writes of a file whose hand-over fenced it while its log was opening
- replication: count a copy's hold toward a synchronous commit only of entries of its home's own chain
- replication: time a home's lease from the ask its witness answered, not from the latest it sent
- replication: give a lease that ran out to the copy of the latest epoch, not to one further on in an older home's chain
- replication: sync a copy's log before the position it checkpoints at, so that a power loss does not send the copy and its nodes back to a snapshot
- replication: cut off what an append that failed partway wrote, so that the nodes reading a copy's log do not fail at it
- replication: leave a home file's wal to its log when a backup or a check reads the file before its engine opens it
- replication: carry a snapshot, a file and a write of any size over tls, and read records that end anywhere in a read
- wire: hold a call that starts while its connection owes past 8 MiB until its client reads, so that one write of many large reads no longer grows the server's memory
- cli: end a connection whose client leaves while the server holds it at the pipe's bound, which no read would end
- protocol: write docs/wire.md's tables of engines and methods from protocol/*.wire and check them, so that a client written from the page calls the numbers the server answers
- wire: read no frame more of a client the connection owes past 8 MiB until it takes some, and stop reading its socket, so that a client that never reads no longer grows the server's memory
- wire: refuse a request's list past 64 times its body's bytes in memory before it is made, so that a body of empty items no longer grows a hundredfold
- wire: refuse a read connection's bucket idle, counters' flush every and database durability, so that its reads renew no key and its opens bind no writer
- wire: read past a field a newer client's hello carries, as the protocol says, so that it still reaches this server and can stop it
- wire: answer a write that ran and whose answer is past the agreed body outcome_unknown, never limit, so that a client does not send a committed take again
- wire: wait at a pipe's close for a wake another thread is making, so that a host that frees its callback then is never called after
- wire: send nothing after the final frame of a subscription or an instruments stream a client cancels while a worker drains it
- wire: give the connection back what a client answers its workers at once, so that nine workers on one connection no longer stall it
- records: let a segment wait out of a merge while a block written after it holds one of its times, so a merge keeps the order a read gives a stream's events of one time
- records: leave out of a merge a segment that begins where the one before ends but was written before it, so a merge never turns round events of one time
- records: read field names a limit's worth of keys a segment and hold the waiting events they parse of the store's memory
- records: give a first poll that finds nothing the next segment's cursor, so a later poll from it counts no event keep removed before it
- records: pack a stream that keeps less than two hours at half its keep, and count in a poll's expired the events keep removed from a head
- records: pack and merge segments that fit a small memory budget, and pack the other heads past one that fails
- records: keep a buffer that still holds lines when its logger or writer went during a flush, so its last lines are written
- metrics: let a publication stand when a write since packing read the series reached none of its samples, so a series written without a pause still packs
- metrics: count in a plan the samples or buckets its call would answer, so explain names the answer's bound before the call stops at it
- metrics: write the names and keeps an ingest gives in its own savepoint, so a call refused for a sample makes no name and moves no keep
- metrics: expire what a head kept no longer before packing it, so a read never meets a sample before its blocks and suspends the series
- search: let a drop take out of the indexes open here only the index it dropped, never one an open made after its commit
- search: refuse a table index's status or ready inside its database's transaction rather than deadlock with its switch
- sdk: read on past a page that ends on a null or an infinity in its order in bun, python and go, as the core now does
- search: read a table index's hits' rows within the store's memory and one call's 64 MiB together, rather than unbounded
- sql: read on past a page that ends on a null or an infinity in its order, rather than end the list there
- sql: stop exec from reporting a last_insert_rowid for an update of a table a search index follows, whose trigger took the same rowid
- search: put a new table index's triggers on its table in the commit that makes it, so its first fill misses no write made meanwhile
- search: write corrected as one readable text when two neighbouring pairs of thai or han are corrected, rather than garble it or panic
- search: stop keys a table index can no longer read, its table renamed or dropped beside the store, from failing every write and the index's drop
- search: keep a row's change of a column only a table index's rebuild reads, such as a vector added, rather than switch in the row as it was
- search: leave an index's handles working when its drop is refused, and refuse a drop inside its file's transaction before it can deadlock
- search: stop a search in db.tx from deadlocking with its index's switch and from leaving a rollback's documents gone and words to later searches
- blobs: make no directory in the holder's store when files open beside it
- blobs: open files while another program holds a file a process that died left in objects/, and remove it once it is let go, where every open failed
- blobs: remove an upload's file from objects/ when its directory's sync fails after the rename, where it stayed on disk for good
- blobs: fail a whole read of a changed file each time it is read again, where a second read of the same file handed its bytes over unchecked
- blobs: read a term past the year 9999 as its last second, where windows panicked on every head, get and list of the file
- blobs: take a write's revision from blobs.db, so that on a copy that took over a new file under a cleared folder stays and a clear hides the home's files
- jobs: name the job whose value no longer reads as the queue's type in the error of a page that meets it
- jobs: keep an update or a set made once a job's lease ended, which its stale holder's settlement deleted
- jobs: move a repeating job whose process died on every attempt to its next time, and start a failed schedule again under its one id
- jobs: start the run a set asked of a running job after a retry, a snooze or a give back, at the set's time and without the old run's steps
- jobs: keep the queues open in a process when a copy beside them applies its home's commit
- locks: renew a lease its request asks for again, so that the store keeps it as long as its holder counts on it
- kv: pass the renewals of a copy's reads of idle keys to their home, so that a key read only on a copy stays alive
- kv: take a copy's next version past its file's revision once it becomes the home, so that no version repeats and no clear lowers another's mark
- locks: let a lease over a connection go at its deadline though nobody asks its key, so that a client gone leaks no lease
- locks: end a lease that ran out before answering its request asked again, so that a client reconnecting late holds no key beside the next holder
- kv: let a quota window too long for a time to end count its uses, rather than panic or never limit
- channels: keep a dropped rust subscription listening until stop or the close, rather than losing its handler and its place
- backup: say a key is left out whenever the snapshot holds sealed values, beside a server that keeps it apart too, and fail to include a key that is not there
- kv: make no new encryption key while a bucket in any file of the directory, opened yet or not, holds values sealed with the lost one
- store: let a reservation of nothing pass the queue of the store's memory, so an empty read no longer waits behind a large one and fails limit
- cli: say a backup beside a server leaves out the key kept apart with --encryption-key-file, and refuse to include it rather than write a zip without it
- kv: make no new encryption key for an empty encrypted bucket while another bucket holds values sealed with the lost one
- store: let a closing store's job and channel handlers finish before any engine closes, so a handler that writes a bucket opened after its queue no longer fails closed and runs again
- store: take a node's commit frames from the store's memory at once, so a full budget no longer holds every write a second behind the writer
- store: serve the store's memory to waiters in the order they came, so small reservations never pass a large one until it fails limit
- store: let background work wait a period past what the clock adds, a counters' flush_every(Duration::MAX), rather than panic
- store: run every background task on time while another is woken on each of its runs, a counters' flush among them
- sqlite: close the idle readers of records, metrics, search and blobs files as kv's, jobs' and sql's close
- sqlite: open a database whose migrations a windows checkout ends with crlf where they were applied with lf
- sqlite: start a wal over at its bound though reads never stop, on a plain file, a node's home and its copy
- store: refuse a close from inside a transaction, which waited for good for the writer the transaction holds
- sqlite: fail a write or a transaction from inside a transaction that would wait for one waiting for it, rather than hang both
- sqlite: wake a read whose reader a pause took before it woke, rather than leave it sleeping out its patience
- sqlite: refuse a given statement that makes a temporary object on the shared writer or writes sqlite_dbpage
- sqlite: stop a statement that rolls back its transaction from failing the writes beside it and committing the rest one by one
- sql: line up a database's transactions for its writer on no thread, so that 17 at once no longer stall
- metrics: write a head that packing or expiry shrank out and in, so that the pages a bulk load's heads grew into leave them
- replication: refuse at once a write on a log opened as its judged node stops, rather than wait out its lease
- replication: tell a link at once of a file its home began to serve before the link's sender started
- replication: let an engine opening a copy wait for a migration its home ran after the copy's snapshot
- records: print the slow sqlite build's warning in a store's logger when no subscriber heard it
- kv: hand a once answer too large to keep to the runs that waited for it, rather than run it again for each
- sdk: let bun's and node's loop turn between the answers an embedded store gives at once
- sdk: say what durability a store runs and how to open it when a program asks for another, and show it in status
- sqlite: build with fdatasync on every platform, and fail a linux release that calls fsync
- web: rebase the landing page's own links under the site's base, as the numbers' caveat now has one
- release: build the linux targets with sqlite's fdatasync, as ci does
- sdk: let bun's loop sleep while an embedded store waits for the core
- sdk: flush a logger's buffer in requests the server takes, not one refused past 2 mib
- release: point every package's homepage at tinyshed.org/tinystore
- sdk: give InUseError in bun and node when another process holds the directory an embedded store opens
Performance
- kv: pass a copy's renewals home without waiting, so that neither the store's scheduler nor a read waits for a link or its copy
- records: read the pages of a count and of all several at once on the machine's threads while few events match, as a search for a rare word does
- sdk: read a long frame into bytes of its own in bun's pipe and from a socket, and copy a got file once for bytes()
- blobs: read a whole file straight into the answer that carries it, and queue a long body as it is rather than copied
- cli: write the answers a client's bytes made ready from the connection's reader, at once, where the writer task was woken for each
- sqlite: checkpoint a file's wal beside its writer, on a caller's thread once it has its answer, where sqlite's own held every queued write for two syncs
- kv: set a key in one statement where nothing its cell holds changes the write, and keep the revision once a commit rather than once a write
Full history: v0.1.0...v0.1.1.