swim: introduce member reference API
Struct swim_member pointer is used to learn member's status, payload, incarnation etc. To obtain a pointer, a one should either lookup the member by UUID, or obtain from iterators API. The former is long, the latter is useless when a point lookup is needed. On the other hand, it was not safe to keep struct swim_member pointer for a long time, because it could be deleted at any moment. This patch allows to reference a member and be sure that it will not be deleted until dereferenced explicitly. The member still can be dropped from the member table, but its memory will be valid. To detect that a member is dropped, a user can use swim_member_is_dropped() function. Part of #3234
Loading
Please register or sign in to comment