yujun777 opened a new pull request, #25898: URL: https://github.com/apache/doris/pull/25898
## Proposed changes partially pick: #25236 it may cause case replica's version = partition's visible version = partition's committed version, and replica's last failed version = partition's + 1. case as follow: a. suppose partition visible version = 10, committed version = 11, the committed txn version T is not published yet; b. clone a replica A to B, after cloning, B's version = 10. c. publish txn T, A version = 11. Also due to txn publish bug, B's version = 11 (PR https://github.com/apache/doris/pull/23706 has fix this). (Another case is: even if this PR is fix and be publish txns ok, but if it powerf off and restart, the be may miss the version 11 because it's not ready to sync disk, and the writes will lost) d. publish another txn, A and B's version become 12; e. now B's backend version is: [1, 10], [12, 12], it will report it missing version = 11; then fe will mark this replica's last failed version = version + 1 = 12 + 1 = 13; f. fe will let B clone version 11 from A, after cloning, B will contains all the version. But Replica.updateVersion has bug, if it found its version not change (12 -> 12),it will not set replica's last failed version to -1. Then later, B will always be: version = 12, last failed version = 13. To Fix this problem, after cloning, if replica's version >= partition's commit version(more precise, replica's version = partition's commit version), and replica's last failed version > partition's commit (more precise, replica's last failed version = partition's commit version + 1), then we should set replica's last failed version to -1. ## Further comments If this is a relatively large or complex change, kick off the discussion at [d...@doris.apache.org](mailto:d...@doris.apache.org) by explaining why you chose the solution you did and what alternatives you considered, etc... -- 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: commits-unsubscr...@doris.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@doris.apache.org For additional commands, e-mail: commits-h...@doris.apache.org