Is ntp.revision used just to prevent multiple (unwanted) group creation? #3940
Replies: 2 comments 2 replies
-
I believe that the ntp revision is also used to prevent conflicts on disk where a partition may move between nodes. if it moves back to a node it was on before we'd want it to live in a new directory. @mmaslankaprv could confirm that and also add some details about other uses of the revision. |
Beta Was this translation helpful? Give feedback.
-
Revision id in the context of raft configuration is used to recognize different instances of the node with the same id. I.e. when node is removed from the group configuration and then added back again its revision changes. This way from raft perspective every time a node with the same id and different revision is added to raft configuration it is different node. |
Beta Was this translation helpful? Give feedback.
-
As per title.
From the code, in a raft group, a vnode means id + revision, which is never updated in consensus._self.
Thus if a new node is up with a higher revision, it can't pass prevote process and become a member, as it sent prevote with a newer target node revision.
Beta Was this translation helpful? Give feedback.
All reactions