wyxxxcat opened a new pull request, #54849:
URL: https://github.com/apache/doris/pull/54849
### What problem does this PR solve?
retry when txn conflict, 10 max retry times
before
```
W20250815 11:37:43.104856 448779 recycler.cpp:3925] failed to delete expired
txn, err=Conflict
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d4
W20250815 11:37:43.104873 448783 recycler.cpp:3925] failed to delete expired
txn, err=Conflict
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d8
W20250815 11:37:43.104945 448784 mem_txn_kv.cpp:200] commit conflict
I20250815 11:37:43.104902 448777 recycler.cpp:3932] recycle expired txn,
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d1
W20250815 11:37:43.104959 448782 recycler.cpp:3925] failed to delete expired
txn, err=Conflict
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d7
W20250815 11:37:43.104981 448779 recycler.cpp:3945] failed to delete recycle
txn kv instance id="concurrent_recycle_txn_label_test_Zq285DM7d6"
key="011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d4"
W20250815 11:37:43.104983 448783 recycler.cpp:3945] failed to delete recycle
txn kv instance id="concurrent_recycle_txn_label_test_Zq285DM7d6"
key="011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f5a71323835444d37643600011074786e00011200000000000003e81200000000000007d8"
```
now
```
W20250815 11:56:22.749135 595891 recycler.cpp:3925] txn conflict, retry
times=6
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e00011200000000000003e81200000000000007d7
db_id=1000 txn_id=2007
I20250815 11:56:22.896646 595892 recycler.cpp:3942] recycle expired txn,
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e00011200000000000003e81200000000000007d8
W20250815 11:56:22.942795 595891 mem_txn_kv.cpp:200] commit conflict
W20250815 11:56:22.942880 595891 recycler.cpp:3925] txn conflict, retry
times=7
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e00011200000000000003e81200000000000007d7
db_id=1000 txn_id=2007
I20250815 11:56:23.079614 595891 recycler.cpp:3942] recycle expired txn,
key=011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e00011200000000000003e81200000000000007d7
I20250815 11:56:23.079846 595741 recycler.cpp:3578] finish scan_and_recycle
key_range=[011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e0001120000000000000000120000000000000000,011072656379636c65000110636f6e63757272656e745f72656379636c655f74786e5f6c6162656c5f746573745f3353706c496c4742534c00011074786e0001127fffffffffffffff127fffffffffffffff)
num_scanned=10 get_range_retried=0 ret=0 err=
I20250815 11:56:23.080000 595741 recycler.h:384] recycle instance:
concurrent_recycle_txn_label_test_3SplIlGBSL, operation type:
recycle_expired_txn_label, cost: 1385 ms, total recycled num: 10, total
recycled data size: 0 bytes
```
### Release note
None
### Check List (For Author)
- Test <!-- At least one of them must be included. -->
- [ ] Regression test
- [ ] Unit Test
- [ ] Manual test (add detailed scripts or steps below)
- [ ] No need to test or manual test. Explain why:
- [ ] This is a refactor/code format and no logic has been changed.
- [ ] Previous test can cover this change.
- [ ] No code files have been changed.
- [ ] Other reason <!-- Add your reason? -->
- Behavior changed:
- [ ] No.
- [ ] Yes. <!-- Explain the behavior change -->
- Does this need documentation?
- [ ] No.
- [ ] Yes. <!-- Add document PR link here. eg:
https://github.com/apache/doris-website/pull/1214 -->
### Check List (For Reviewer who merge this PR)
- [ ] Confirm the release note
- [ ] Confirm test cases
- [ ] Confirm document
- [ ] Add branch pick label <!-- Add branch pick label that this PR should
merge into -->
--
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]