|
|
@@ -162,7 +162,7 @@ public class ClusterUniqueTask implements Task ,Serializable{
|
|
|
workerId=this.getCurrentSeverId();
|
|
|
return Flux.interval(Duration.ofSeconds(pingTime/2))
|
|
|
.filter(ignore->{
|
|
|
- if (!isReplica()) {
|
|
|
+ if (isReplica()) {
|
|
|
//非主节点,解锁,停止发送心跳
|
|
|
lock.unlock();
|
|
|
creatUniqueFail();
|
|
|
@@ -290,7 +290,11 @@ public class ClusterUniqueTask implements Task ,Serializable{
|
|
|
}
|
|
|
|
|
|
|
|
|
- public boolean isReplica(){
|
|
|
+ /**
|
|
|
+ * 副本节点
|
|
|
+ * @return
|
|
|
+ */
|
|
|
+ private boolean isReplica(){
|
|
|
return !this.getCurrentSeverId().equals(this.getWorkerId());
|
|
|
}
|
|
|
|