Binbin aee8d1ff28
Changed activeExpireCycle server.masterhost check to iAmMaster in beforeSleep (#11997)
In cluster mode, when a node restart as a replica, it doesn't immediately
sync with the master, replication is enabled in clusterCron. It means that
sometime server.masterhost is NULL and we wrongly judge it in beforeSleep.

In this case, we may trigger a fast activeExpireCycle in beforeSleep, but the
node's flag is actually a replica, that can lead to data inconsistency.  In this
PR, we use iAmMaster to replace the `server.masterhost == NULL`

This is an overlook in #7001, and more discussion in #11783.
2023-04-04 09:05:52 +03:00
..
2012-04-13 17:52:33 -07:00
2022-11-23 17:39:08 +02:00
2022-08-22 15:01:40 +08:00
2022-08-22 15:01:40 +08:00
2020-04-24 17:11:21 -07:00
2023-01-11 09:59:24 +01:00
2022-11-09 19:50:07 +02:00
2022-11-09 19:50:07 +02:00
2022-03-09 13:58:23 +02:00
2020-05-05 23:35:08 -04:00
2022-08-23 12:37:56 +03:00
2022-04-17 15:43:22 +03:00
2014-08-08 10:05:32 +02:00
2022-10-02 13:56:45 +03:00
2023-02-12 09:23:29 +02:00
2022-08-23 12:37:56 +03:00
2023-02-12 09:23:29 +02:00
2023-02-12 09:23:29 +02:00
2021-07-10 10:04:54 -05:00
2014-07-02 16:31:22 +02:00
2022-07-18 10:56:26 +03:00
2023-01-22 16:32:20 +02:00
2023-02-12 09:23:29 +02:00