Details
-
Bug
-
Status: Resolved
-
Major
-
Resolution: Invalid
-
0.5.0
-
None
-
None
-
None
Description
While reading the code, it appears that the FileStoreStateMachine#read expects
FileStoreRequestProto.RequestCase.WRITEHEADER instead of the READHEADER
It also attempts to process a Write Header and send as a Read Response.
public CompletableFuture<ByteString> read(LogEntryProto entry) { . . . if (proto.getRequestCase() != FileStoreRequestProto.RequestCase.WRITEHEADER) { return null; } final WriteRequestHeaderProto h = proto.getWriteHeader(); CompletableFuture<ExamplesProtos.ReadReplyProto> reply = files.read(h.getPath().toStringUtf8(), h.getOffset(), h.getLength()); return reply.thenApply(ExamplesProtos.ReadReplyProto::getData); }
May be I am just missing something here.