amaliujia opened a new pull request, #11767: URL: https://github.com/apache/ozone/pull/11767
## What changes were proposed in this pull request? A PutBlock committed through the data stream (the mid-stream STREAM_COMMAND or the close-time STREAM_LINK) has no Raft log entry to replay. Today neither the block file nor the RocksDB write-ahead log is synced before the datanode replies, so a crash after the acknowledgement can lose acknowledged data. Proposed changes: LocalStream.onCommand and KeyValueStreamDataChannel.closeWithStreamPutBlock call force(false) before the PutBlock is dispatched. KeyValueHandler.handlePutBlock calls flushLog(true) for stream-commit ops (the new DispatcherContext.Op.isStreamCommit()). ## What is the link to the Apache JIRA https://issues.apache.org/jira/browse/HDDS-17093 ## How was this patch tested? Unit test -- 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]
