[
https://issues.apache.org/jira/browse/RATIS-944?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Dinesh Chitlangia resolved RATIS-944.
-------------------------------------
Resolution: Invalid
> Fix FileStoreStateMachine#read
> ------------------------------
>
> Key: RATIS-944
> URL: https://issues.apache.org/jira/browse/RATIS-944
> Project: Ratis
> Issue Type: Bug
> Affects Versions: 0.5.0
> Reporter: Dinesh Chitlangia
> Assignee: Dinesh Chitlangia
> Priority: Major
>
> 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.
> {code:java}
> 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);
> }
> {code}
>
> May be I am just missing something here.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)