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
Read-only test and docs assume commit() raises; ArcadeDB 26.11.1 changed it #199
tests/test_open_read_only.py::test_read_only_begin_is_not_refused_the_write_and_the_commit_are and two docstrings in src/arcadedb/core.py (DatabaseFactory.open and open_database) state that on a read-only database commit() raises. ArcadeDB changed that on purpose: upstream PR ArcadeData/arcadedb#11124 (merged as f348f7657e, for issue ArcadeData/arcadedb#11057) replaced the checkTransactionIsActive(false) guard in LocalDatabase.commit() and rollback() with checkTransactionToEnd(), which only checks that the database is open and a transaction is active. On a READ_ONLY database, begin(), reads, then commit() or rollback() now succeed. A save() inside the transaction still raises DatabaseIsReadOnlyException, and commit() with no transaction still raises TransactionException.
The JVM CI legs take their engine jars from the arcadedata/arcadedb:latest snapshot image, which has the change, so the test fails on every JVM leg at its second pytest.raises (the commit) with DID NOT RAISE ArcadeDBError (seen on dispatched run 41475546892 for PR #194). The native wheels on main still link engine 26.10.2, where the commit raises, and the 26.11.1 release will ship the new behaviour, so the test must hold on both.
Fix: keep the save() assertion strict, accept either outcome for commit() (the 26.11.1-SNAPSHOT line spans both behaviours, so a version check cannot tell them apart), and update the two docstrings.
Activity
Test: a refused read-only commit leaves the transaction active on old…
Test and docs: read-only transaction may commit on engines from 26.11…