[
https://issues.apache.org/jira/browse/RATIS-2377?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18131320#comment-18131320
]
Ivan Andika commented on RATIS-2377:
------------------------------------
[~elialovesgolang] thanks for checking this out.
> I think the simplest way to implement a fail-fast mechanism would be to
monitor the gap between the read index and the last applied index. So If the
gap is too large we could reject the request by throwing an exception.
This is a good idea. We can have a configuration to check how many logs are
pending to be applied.
> Support fail fast linearizable read operations
> ----------------------------------------------
>
> Key: RATIS-2377
> URL: https://issues.apache.org/jira/browse/RATIS-2377
> Project: Ratis
> Issue Type: New Feature
> Reporter: Ivan Andika
> Assignee: Ivan Andika
> Priority: Major
>
> Currently linearizable read might block if the read is not ready to be
> processed yet. This might not be desirable in some cases. For example, if a
> server only contains a fixed handler threads, this might block one of the
> thread for too long which can affect other queued writes / reads.
> It might be a good idea to have a mechanism so that the request will return /
> throws exception if the request cannot return immediately (similar to
> RaftServerImpl#staleReadAsync). In this case, the caller can either return
> the exception to client for retry or requeue the call.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)