baidu / braft

An industrial-grade C++ implementation of RAFT consensus algorithm based on brpc, widely used inside Baidu to build highly-available distributed systems.
Apache License 2.0
3.86k stars 865 forks source link

"ABA"? #413

Closed tdrhq closed 12 months ago

tdrhq commented 12 months ago

Hi folks!

Thanks for building braft, super awesome so far.

I'm not able to figure out what ABA stands for. I see it referenced at several places, including the examples (e.g. https://github.com/baidu/braft/blob/master/example/block/server.cpp#L153).

I'm not sure if this is a standard terminology associated with the Raft protocol since I'm not able to find any relevant Google search results. Could you expand that for me? I'm happy to go about searching and reading about this myself, but right now I just don't know what to look for.

Thanks! Arnold

tdrhq commented 12 months ago

Ah, as soon as I wrote that I think I figured it out https://en.wikipedia.org/wiki/ABA_problem

Still trying to figure out how that line of code prevents issues here, but at least at this point I know what this is talking about so I'll close this out.