GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||
GeezerVison is showing github.com — Native: run_in_transaction refuses to replay a block that already committed part of its work (P-03) by tae898 · Pull Request #527 · humemai/arcadedb-embedded-python
This repository was archived by the owner on Nov 21, 2026. It is now read-only.
Conversation
|
| publishing step | attempts | rows with v = 2 |
sum(v) (single application: 20 or 25) |
|---|---|---|---|
UPDATE ... BATCH 10 |
2 (replayed, returned success) | 20 | 45 |
commit() + begin() inside the block |
2 (replayed, returned success) | 25 | 50 |
Only the read of the commit-count witness may fail quietly (no witness: retry, as the JVM does). The comparison and the raise now sit outside that try, so the original conflict escapes after the rollback, as on the JVM wheel. The contract is added to the run_in_transaction API doc.
tests/test_run_in_transaction_partial_commit.py has no Java class and no fabricated error, so one file runs on both wheels: the two publishing steps above (single application, one attempt, the conflict raised, no transaction left open) and a block that committed nothing, which is still retried once and succeeds.
nnext library), native-preview without this change: the two partial-commit tests fail (red), the retry-still-works test passesnnext library), this branch: the new file, test_core.py, test_run_in_transaction_retry.py and test_interrupt_hygiene.py: 62 passed, 9 skippedwheel-main-78e97b1cff (main): the new file, 3 passed (parity, no change to the JVM side)_native/database.py: no findings🤖 Generated with Claude Code
Sorry, something went wrong.
There was an error while loading. Please reload this page.
…mitted part of its work (P-03) The guard that refuses a retry after a BATCH boundary or a commit() inside the block sat in a try whose own `except ArcadeDBError: pass` swallowed the `raise` it was written to make, so the block was replayed and its durable part applied twice. Only the read of the commit-count witness may fail quietly; the raise now sits outside that try. The JVM core already refused. The new test uses a real conflict (a second thread commits to a record the block also wrote), so it runs on both wheels: red on the native wheel before this change (20 of 25 rows incremented twice after a BATCH boundary, all 25 after a commit() inside the block), green after, green on the JVM wheel. The contract is added to the run_in_transaction API doc. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
216bf0a to
514b225
Compare
…e text) Co-Authored-By: Claude Opus 5.5 <[email protected]>
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.