imbajin commented on code in PR #3237:
URL: https://github.com/apache/hugegraph/pull/3237#discussion_r4116603581
##########
hugegraph-pd/hg-pd-core/src/main/java/org/apache/hugegraph/pd/raft/RaftEngine.java:
##########
@@ -74,6 +75,15 @@ public class RaftEngine {
*/
private static final long ALIVE_PEERS_REFRESH_MS = 1000L;
+ private static final int READ_INDEX_RETRIES = 5;
Review Comment:
⚠️ [P2] Keep retrying transient ReadIndex failures until the configured
deadline. `waitReadIndex()` waits for `rpcTimeout` (10 seconds by default), but
this code schedules only five retries 20 ms apart; after roughly 100 ms,
`readIndex()` completes with `UNKNOWN_VALUE`. A newly elected JRaft leader
returns `EAGAIN` until an entry in its current term commits, so a quorum that
needs longer than 100 ms makes `IdMetaStore.getId()` fail even while the
configured timeout remains. Please retry `EAGAIN`/`EBUSY` until the `timeoutMs`
deadline and add coverage for recovery after the current retry window.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]