Details
-
Sub-task
-
Status: Resolved
-
Major
-
Resolution: Fixed
-
None
-
None
Description
Optimized the putBlock method of BlockDataStreamOutput
1. PutBlock does not use RaftRpc, but through the stream close() method
// putBlock metadata ByteBuffer buf = ContainerCommandRequestMessage.toMessage(putBlockRequestProto, null) .getContent().asReadOnlyByteBuffer(); out.writeAsync(buf, StandardWriteOption.CLOSE);
2.Mark the stream data boundary by sending an empty stream packet
// Mark the stream data boundary
out.writeAsync(ByteBuffer.allocateDirect(0).asReadOnlyBuffer());
3. Flush is also in the form of async RPC, because putBlock needs to fetch bcsId (Raft log index)
Attachments
Attachments
Issue Links
- depends upon
-
RATIS-1556 Support reference-counted buffer in StateMachine.DataChannel
-
- Resolved
-
- is depended upon by
-
HDDS-6500 Buffer the PutBlockRequest at the end of the stream
-
- Resolved
-
- links to