Bug fix: Use right nodeId
Change-Id: I87270466fec487a3b0496f75865b1e2a2df32f8a
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -182,7 +182,7 @@ public class ConsistentDeviceMastershipStore | ... | @@ -182,7 +182,7 @@ public class ConsistentDeviceMastershipStore |
182 | 182 | ||
183 | String leadershipTopic = createDeviceMastershipTopic(deviceId); | 183 | String leadershipTopic = createDeviceMastershipTopic(deviceId); |
184 | NodeId leader = leadershipService.getLeader(leadershipTopic); | 184 | NodeId leader = leadershipService.getLeader(leadershipTopic); |
185 | - if (Objects.equal(localNodeId, leader)) { | 185 | + if (Objects.equal(nodeId, leader)) { |
186 | return MastershipRole.MASTER; | 186 | return MastershipRole.MASTER; |
187 | } | 187 | } |
188 | return leadershipService.getCandidates(leadershipTopic).contains(nodeId) ? | 188 | return leadershipService.getCandidates(leadershipTopic).contains(nodeId) ? | ... | ... |
-
Please register or login to post a comment