eBay / NuRaft

C++ implementation of Raft core logic as a replication library
Apache License 2.0
1.02k stars 240 forks source link

is append_entries thread-safe or not? #209

Open Steamgjk opened 3 years ago

Steamgjk commented 3 years ago

I looked at raft_bench.cxx and notice that worker_func will call append_entries, however, the lock is only used to guard numops. When we spawned multiple threads, will these threads call append_entries concurrently? In that way, will append_entries be thread-safe (I guess so)?

greensky00 commented 3 years ago

@Steamgjk Yes, it is thread-safe.