in ratis-logservice/src/main/java/org/apache/ratis/logservice/impl/LogStreamImpl.java [177:196]
public long getStartRecordId() throws IOException {
try {
RaftClientReply reply = raftClient
.io().sendReadOnly(Message.valueOf(LogServiceProtoUtil
.toGetStartIndexProto(name).toByteString()));
if (reply.getException() != null) {
throw new IOException(reply.getException());
}
GetLogStartIndexReplyProto proto =
GetLogStartIndexReplyProto.parseFrom(reply.getMessage().getContent());
if (proto.hasException()) {
LogServiceException e = proto.getException();
throw new IOException(e.getErrorMsg());
}
return proto.getStartIndex();
} catch (Exception e) {
throw new IOException(e);
}
}