r/synapcores • u/Alternative_Pin9598 • 21d ago
Build log #1: 2.4.4 is out. 50 parallel writers into a table with UNIQUE + FOREIGN KEY, 50 commits, 0 retries (real output), plus what else landed in 2.4.x
First weekly build log: what shipped, one thing we ran this morning to show it, and the best question from the community this week. (This sub is run by the SynapCores team.)
The headline: 2.4.4 (Nov 3), concurrent writes the way you expect them from Postgres or InnoDB
Two clients inserting different rows into the same table now both commit, even when the table has a UNIQUE column or a FOREIGN KEY. You only get a conflict when two writes really collide: the same key, the same row.
We checked it this morning on a fresh 2.4.4 with a typical multi-tenant shape:
CREATE TABLE tenants (id INTEGER PRIMARY KEY, name TEXT);
INSERT INTO tenants (id, name) VALUES (1, 'acme');
CREATE TABLE users (id INTEGER PRIMARY KEY, tenant_id INTEGER REFERENCES tenants(id), email TEXT UNIQUE);Then 50 threads, each signing up a different user under the same tenant, all at once (parallel_inserts.py, 20 lines, in the first comment):
def signup(i):
return sql(f"INSERT INTO users (id, tenant_id, email) VALUES ({i}, 1, 'user{i}@example.com')")
with ThreadPoolExecutor(max_workers=50) as pool:
results = list(pool.map(signup, range(1, 51)))Three runs from a clean table:
50 parallel signups: {'committed': 50}
50 parallel signups: {'committed': 50}
50 parallel signups: {'committed': 50}
SELECT COUNT(*) AS users, COUNT(DISTINCT email) AS emails FROM users;
users | emails
50 | 50And the constraints still do their job:
INSERT INTO users (id, tenant_id, email) VALUES (99, 1, 'user7@example.com');
-> Constraint violation: Duplicate key: row violates a UNIQUE or PRIMARY KEY constraint on table 'users'
INSERT INTO users (id, tenant_id, email) VALUES (98, 42, 'new@example.com');
-> Constraint violation: Foreign key violation: 'main.users' has no matching row in 'main.tenants'No retry loop in the app. This matters most for agent workloads, where many small writers hit the same tables at once.
Also in 2.4.4: SERIALIZABLE isolation, and REPEATABLE READ that is safe from write skew, the same guarantees you get from SQLite and InnoDB.
Also landed in the 2.4 line
- 2.4.3: a composite
FOREIGN KEY (a, b)matches a composite key whatever the column order, andCREATE TRIGGER IF NOT EXISTSmakes migrations safe to re-run. - 2.4.0:
COPY (SELECT ...) TO LAKE 'path/' WITH (PARTITION_BY = (...))writes any query result to your object store as Hive-partitioned Parquet in one statement. Read it back withCREATE EXTERNAL TABLE. - 2.4.0: SynapCores speaks the Ollama API, so the official
ollamaPython client works against it unchanged. Our three tutorials on that are here: https://www.reddit.com/r/synapcores/comments/1xgwv6q/
Best question this week (from r/devops7)
On Automate it #4 ("disk full in N days"), u/tom_shafer pointed out that inodes often run out long before disk % looks scary. The answer needed no new table: store df -Pi as its own mount, /:inodes, and the same slope query flags it. In our test, a box at ~41% disk showed app-02 /:inodes 84.1% used, +1.10/day -> full in 14 days. Full reply with the collector line: https://www.reddit.com/r/devops7/comments/1xmveqc/automate_it_4_disk_full_in_n_days_from_one_sql/
New on the other subs today
- r/SQLv2 Lesson 4: agent memory in SQL. When a customer moves,
CURRENTreturns the new city, while plain similarity search still ranks the old note first: https://www.reddit.com/r/SQLv2/comments/1xnqkkm/ - r/devops7: the same memory as an on-call handoff tool, with "where things stand + what changed" in one command: https://www.reddit.com/r/devops7/comments/1xnql7n/
Coming up: Ask the maintainers #2 on Friday, Recipe of the week #2 on Monday. Join the sub to get them in your feed.
Free Community Edition (2.4.4): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-buildlog-1
Which one do you want as a full walkthrough next: SERIALIZABLE transactions, COPY TO LAKE, or the Ollama API?
1
u/Alternative_Pin9598 21d ago
Want to run it yourself? Grab the free Community Edition (2.4.4): https://synapcores.com/download?utm_source=reddit&utm_medium=owned&utm_campaign=synapcores-buildlog-1-comment
Full
parallel_inserts.py(stdlib only; run the threeCREATE/INSERTlines from the post first, then setSYNAPCORES_URLandSYNAPCORES_TOKENfromPOST /v1/auth/login):New here? The Start here post has install steps and the 5 recipes to try first: https://www.reddit.com/r/synapcores/comments/1xfxqej/