dataroaring opened a new pull request, #59990:
URL: https://github.com/apache/doris/pull/59990

   ## Summary
   - Move edit log operations outside the write lock in DatabaseTransactionMgr
   - Reduces lock hold time from milliseconds to microseconds
   - Enables higher concurrency for multi-table workloads in the same database
   
   ## Changes
   - Add `unprotectUpdateInMemoryState()` for in-memory updates inside lock
   - Add `persistTransactionState()` for edit log writes outside lock  
   - Refactor transaction lifecycle methods to use the new pattern:
     - `beginTransaction`
     - `preCommitTransaction2PC`
     - `commitTransaction` (both overloads)
     - `finishTransaction`
     - `abortTransaction` / `abortTransaction2PC`
     - `removeUselessTxns`
   
   ## Safety Guarantees
   - In-memory state updated atomically within write lock before release
   - Edit log failures call `System.exit(-1)`, preventing inconsistent state
   - Replay path unchanged (uses `isReplay=true`, skips edit log write)
   - ACID properties preserved
   
   ## Test plan
   - [ ] Run DatabaseTransactionMgrTest unit tests
   - [ ] Concurrent load testing with multiple tables in same database
   - [ ] Verify lock hold time reduction via metrics
   
   Fixes: https://github.com/apache/doris/issues/53642


-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to