You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Docs: a durable key-value store with SQL, and ALTER DATABASE txWalFlush on an open database #575
concurrencyThreads, transactions and conflictsdocumentationImprovements or additions to documentationjvmThe arcadedb-jvm package (JPype build)pythonPull requests that update python code
Use ArcadeDB as a durable key-value store from Python, where a write that returned must survive kill -9 and a power loss. The docs have no page for it, and one setting behaves in a way the durability page does not say.
What the docs lack
A recipe for a key-value store through plain SQL: a document type with a unique index on key, UPDATE kv SET key = ?, value = ? UPSERT WHERE key = ?, db.lookup_by_key("kv", ["key"], [key]), a prefix scan as a range on key. I ran it on 26.11.1.post4 of both packages. After kill -9 of the writer there were 0 lost acknowledged writes on arcadedb (3,336 acknowledged) and on arcadedb-jvm (2,947).
A warning that ALTER DATABASE with arcadedb.txWalFlush 1 reads back as 1 straight away, but the open database does not sync. I counted fdatasync calls with strace over 300 commits:
How the setting was made
fdatasync calls (both packages)
Default
0
ALTER DATABASE on the open database
0 or 1
ALTER DATABASE, then close and open again
302 to 304
db.set_wal_flush("yes_nometadata")
300
-Darcadedb.txWalFlush=1 at process start
305
The current durability page says it does not say what the statement does to a thread that already has a transaction context. This measures it for the thread that ran the statement.
What I would like to see
A short how-to page how-to/key-value.adoc with the recipe and the strace check (every Python block run by a test, like the other how-to pages), and a warning box on how-to/durability.adoc about the reopen. The engine behaviour itself goes to ArcadeData/arcadedb as a separate question, so this issue is docs only.
concurrencyThreads, transactions and conflictsdocumentationImprovements or additions to documentationjvmThe arcadedb-jvm package (JPype build)pythonPull requests that update python code
Activity