F64116045 opened a new pull request, #11863: URL: https://github.com/apache/ozone/pull/11863
## What changes were proposed in this pull request? `saveConfiguration()` runs during Ratis transaction apply, before the transaction index is updated. Its direct `flush()` can persist data with the previous index, causing an already-persisted transaction to be replayed after a crash. This PR uses `flushIfNeeded(0)` to defer the flush while apply is in progress. This keeps the data and transaction index consistent and avoids incorrect results from this replay if non-idempotent operations are introduced in the future. This fixes a similar issue to #11837 in `StatefulServiceStateManagerImpl`. ## What is the link to the Apache JIRA? https://issues.apache.org/jira/browse/HDDS-16453 ## How was this patch tested? Added a regression test that calls `saveConfiguration()` during apply and verifies that the configuration stays buffered until it can be flushed with the updated transaction index. CI: -- 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]
