Skip to content
Snippets Groups Projects
  • Georgy Moshkin's avatar
    575a9f29
    fix: unify which term is used for cas predicates · 575a9f29
    Georgy Moshkin authored
    CAS predicates should always contain the current raft term, because this
    is what's explicitly checked in proc_cas.
    
    Note that this will sometimes result in a EntryTermMismatch error
    because the latest applied entry may have a different term in case the
    election has started but not finished yet.
    
    We could add this check to all the client cas precondition checks, but
    it's not a big deal, because we handle the situation correctly anyways.
    575a9f29
    History
    fix: unify which term is used for cas predicates
    Georgy Moshkin authored
    CAS predicates should always contain the current raft term, because this
    is what's explicitly checked in proc_cas.
    
    Note that this will sometimes result in a EntryTermMismatch error
    because the latest applied entry may have a different term in case the
    election has started but not finished yet.
    
    We could add this check to all the client cas precondition checks, but
    it's not a big deal, because we handle the situation correctly anyways.