mirror of
https://github.com/predis/predis.git
synced 2026-11-16 07:27:48 +00:00
45b6bcc6d9
Retrying one of its commands on a new connection runs it outside of the transaction: with Sentinel even without the retry option, since SentinelReplication retries on its own. A transaction block then threw with one command already written, and a CAS transaction overwrote a change made after WATCH, because MULTI and EXEC ran on a connection that watched nothing. MultiExec::unwatch() now goes through the strategy before MULTI, a held connection that is no longer open fails instead of reconnecting outside the transaction, a StreamInitException releases it too, and replication holds getCurrent(). In CAS mode the first command initializes the transaction without sending MULTI, so MultiExec::unwatch() now checks for CAS too.