xichen01 commented on PR #4988: URL: https://github.com/apache/ozone/pull/4988#issuecomment-1751966551
> @xichen01 I tried to understand the changes and impact, I am just getting lost in code, My Understanding, Here, State Machine to avoid duplicate sending for DeleteBlock command but can not find any good action for these state. > > TO_BE_SENT: initial state NEED_EXECUTED, EXECUTED: just removed on timeout, no other action on keep these PENDING_EXECUTED, SENT: just to avoid retry, and on timeout, remove > > Do we really need so many states? Or just, "INTIAL" & "SENT", and cleanup on timeout or executed. > > * One improvement can see from this PR that next command, it includes new set of blocks (even current blocks are not yet executed). > > I think we should have refactored code including transactionToDNsCommitMap, transactionToRetryCountMap to take advantage of these state management and simplified the code. OK, I'll try to compress some of the state to reduce the complexity of the code. -- 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]
