advisedy opened a new pull request, #3556:
URL: https://github.com/apache/kvrocks/pull/3556

   ## Summary
   
   Fixes #3555.
   
   Add command-level RocksDB savepoints during `EXEC` so a failed write command
   cannot leave partial ops in the shared transaction batch.
   
   ## Changes
   
   - Add `Storage::{Set,Pop,Rollback}TxnSavePoint` around the transaction write 
batch
   - Apply savepoints in `Connection::ExecuteCommands` for `kCmdWrite` during 
`EXEC`
   - Apply the same boundary for nested script write commands in `scripting.cc`
   - Mark `EVAL` / `FCALL` with `kCmdSkipTxnSavepoint` so outer script errors 
do not
     roll back already successful nested writes
   - On fatal savepoint errors, `EXEC` aborts the shared batch and returns 
errors for
     the queued command list
   
   ## Tests
   
   Go cases in `tests/gocase/unit/multi/multi_test.go`:
   
   1. Issue repro: a failed `HSET` under `write_batch_max_bytes` leaves no 
partial
      hash fields; the following `SET` still commits
   2. An `EVAL` runtime error keeps a previously successful nested `SET`
   3. A failed multi-field write via `redis.pcall` rolls back only that 
command; a
      later nested `SET` still commits


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to