You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ignite.apache.org by "Cyrill (via GitHub)" <gi...@apache.org> on 2025/10/17 12:35:50 UTC
Re: [PR] IGNITE-26271 Fix incorrect calculation of alive data nodes for disaster recovery [ignite-3]
Cyrill commented on code in PR #6569:
URL: https://github.com/apache/ignite-3/pull/6569#discussion_r2439808897
##########
modules/raft/src/main/java/org/apache/ignite/raft/jraft/core/NodeImpl.java:
##########
@@ -1620,8 +1621,18 @@ else if (this.state.compareTo(State.STATE_TRANSFERRING) <= 0) {
}
// Should be in readLock
- private boolean isLearner() {
- return this.conf.listLearners().contains(this.serverId);
+ private boolean isLearner(boolean blocking) {
+ if (!blocking) {
Review Comment:
What about something like this?
```
private boolean isLearnerUnsafe() {
return this.conf.listLearners().contains(this.serverId);
}
private boolean isLearner() {
this.readLock.lock();
try {
return isLearnerUnsafe();
}
finally {
this.readLock.unlock();
}
}
```
--
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: notifications-unsubscribe@ignite.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org