Skip to content

Test and docs: read-only transaction may commit on engines from 26.11.1 - #200

Merged
tae898 merged 2 commits into
mainfrom
fix/199-read-only-commit
Nov 2, 2026
Merged

tae898 merged 2 commits into
mainfrom
fix/199-read-only-commit

Conversation

@tae898

@tae898 tae898 commented Nov 2, 2026 •

Copy link
Copy Markdown
Collaborator

Closes #199

ArcadeDB PR ArcadeData/arcadedb#11124 (issue ArcadeData/arcadedb#11057) made commit() and rollback() of a read-only transaction succeed from 26.11.1; a write inside it still raises. The JVM legs run against the snapshot engine and fail on the old assumption.

In tests/test_open_read_only.py the save() assertion stays strict (ArcadeDBError matching read.?only, count unchanged). commit() accepts either outcome, because 26.11.1-SNAPSHOT spans both behaviours and a version check cannot separate them: it returns (new engines) or raises the read-only error (engines before the change, as in the native wheels on 26.10.2). The data is unchanged in both cases. is_transaction_active() is asserted false only when the call returns: the old engine refuses the commit, leaves the transaction active, and refuses a rollback after it too. The test is renamed to test_read_only_begin_reads_and_the_write_is_refused_the_commit_is_either, and a second test covers rollback() the same way.

The DatabaseFactory.open and open_database docstrings in src/arcadedb/core.py no longer say the commit raises. No page under docs/ or README.md made that claim. Checked locally: compile and pyflakes on the test file (clean); core.py shows only two pyflakes findings that predate this change. The suite is left to CI.

🤖 Generated with Claude Code

tae898 and others added 2 commits November 3, 2026 01:35
…11.1 (#199)

ArcadeDB PR #11124 (issue #11057) lets commit() and rollback() of a read-only transaction succeed; writes inside it still raise. The test now keeps the save() assertion strict and accepts either commit() outcome (the 26.11.1 snapshot spans both), checking the data is unchanged and no transaction stays active. The DatabaseFactory.open and open_database docstrings no longer say the commit raises.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… engines (#199)

The native parity leg (engine 26.10.2) failed both new tests: the old engine refuses commit() with "Cannot begin a transaction on a read only database", leaves the transaction active, and refuses the rollback after it the same way, so the is_transaction_active() assertion cannot hold there. The shared helper now asserts inactive only when the commit or rollback returns (26.11.1 and later) and, when it raises, only that the message names read-only.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@tae898
tae898 merged commit 317ae30 into main Nov 2, 2026
38 checks passed
@tae898
tae898 deleted the fix/199-read-only-commit branch November 2, 2026 17:32
tae898 added a commit that referenced this pull request Nov 2, 2026
…t test for engine 26.11.1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Read-only test and docs assume commit() raises; ArcadeDB 26.11.1 changed it

1 participant