Ping Xie 66d0f7d9a1
Ensure only primary sender drives slot ownership updates (#754)
Fixes a regression introduced in PR #445, which allowed a message from a
replica
to update the slot ownership of its primary. The regression results in a
`replicaof` cycle, causing server crashes due to the cycle detection
assert. The
fix restores the previous behavior where only primary senders can
trigger
`clusterUpdateSlotsConfigWith`.

Additional changes:

* Handling of primaries without slots is obsoleted by new handling of
when a
  sender that was a replica announces that it is now a primary.
* Replication loop detection code is unchanged but shifted downwards.
* Some variables are renamed for better readability and some are
introduced to
  avoid repeated memcmp() calls.

Fixes #753.

---------

Signed-off-by: Ping Xie <pingxie@google.com>
2024-07-16 13:05:49 -07:00
..
2024-06-03 12:22:06 -07:00
2024-05-22 23:24:12 -07:00
2024-06-30 11:33:10 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-06-30 11:33:10 -07:00
2024-05-22 23:24:12 -07:00
2024-05-28 09:27:51 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-07-02 15:45:37 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-07-02 15:45:37 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2020-05-05 23:35:08 -04:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-06-07 01:40:55 +02:00
2024-05-22 23:24:12 -07:00
2024-07-02 15:45:37 -07:00
2024-07-02 15:45:37 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2021-07-10 10:04:54 -05:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-05-22 23:24:12 -07:00
2024-06-30 11:33:10 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-07-08 20:01:39 -07:00
2024-07-08 20:01:39 -07:00
2024-05-27 23:03:34 +02:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00
2024-05-22 23:24:12 -07:00