sumitagrawl opened a new pull request, #5857: URL: https://github.com/apache/ozone/pull/5857
## What changes were proposed in this pull request? takeSnapshot() in OM state machine is updating the TRANSACTION_INFO_KEY in db with old lastAppliedTransaction index, this is causing replay of all transactions and having issue. The cause of old last applied transaction index is: - some of transaction is failed (butcket is deleted and key can not be added) - In this failure scenario, error response not added to double buffer causing miss of index. - As logic at OM State machine, it mandates the index must be in sequence to update lastAppliedIndex. So its not getting update due to miss. - Further, ratisTransactionMap keep populating with more indexes as pending causing memory leak situation As solution, - takeSnapshot must not update db with TRANSACTION_INFO_KEY but get term & index from db - update term&index in sequence from applyTransaction and notifyTermIndexUpdated using double buffer Note: change also impact upgrade Prepare request, covered by existing testcases. As fix, - DoubleBuffer do callback to OMStateMachine to get the index to be updated and applied - notifyTermIndexUpdated just record new indexes to be applied to ratisTransactionMap and provided to DoubleBuffer over callback ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-9342 ## How was this patch tested? - existing testcases cover scenario - upgrade prepare impact also verified with existing testcase -- 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]
