etcd/tests/integration
Jan Schär 605abca29d etcdserver: fix panic when checking IsLearner of removed member
Previously, calling s.IsLearner() when the local node is no longer a
member panics. There was an attempt to fix this by first checking
IsMemberExist(), but this is not a correct fix because the member could
be removed between the two calls. Instead of panicking when the member
was removed, IsLearner() should return false. A node which is not a
member is also not a learner.

There was a similar concurrency bug when accessing the IsLearner
property of a member, which will panic with a nil pointer access error
if the member is removed between the IsMemberExist() and Member() calls.

Signed-off-by: Jan Schär <jan@monogon.tech>
2024-09-25 17:31:30 +02:00
..
2023-09-24 14:21:11 +08:00
2023-09-19 20:24:01 +08:00
2024-03-25 10:34:44 +08:00
2024-08-29 22:16:48 +02:00
2023-10-17 21:24:13 +08:00
2023-03-17 14:39:18 -07:00
2023-09-19 20:24:01 +08:00
2022-11-17 19:07:04 +03:00
2023-10-17 21:24:13 +08:00