12 Commits

Author SHA1 Message Date
Mykhailo Pylyp
c0a41896da Recalculate hardcoded variables from $::instances_count in sentinel tests (#7561)
Co-authored-by: MemuraiUser <githubuser@janeasystems.com>
2020-09-13 18:39:59 +03:00
Yossi Gottlieb
10ffeb03e4 TLS: Connections refactoring and TLS support.
* Introduce a connection abstraction layer for all socket operations and
integrate it across the code base.
* Provide an optional TLS connections implementation based on OpenSSL.
* Pull a newer version of hiredis with TLS support.
* Tests, redis-cli updates for TLS support.
2019-10-07 21:06:13 +03:00
Chris Lamb
c2f52c1752 Correct "did not received" -> "did not receive" typos/grammar. 2018-08-26 14:45:39 +02:00
antirez
4ab50e35ba Sentinel: test command renaming feature. 2018-06-26 16:08:43 +02:00
antirez
16534c5f6f Sentinel: new test unit 07 that tests master down conditions. 2016-07-22 16:39:26 +02:00
antirez
d6332b5034 Sentinel: check Slave INFO state more often when disconnected.
During the initial handshake with the master a slave will report to have
a very high disconnection time from its master (since technically it was
disconnected since forever, so the current UNIX time in seconds is
reported).

However when the slave is connected again the Sentinel may re-scan the
INFO output again only after 10 seconds, which is a long time. During
this time Sentinels will consider this instance unable to failover, so
a useless delay is introduced.

Actaully this hardly happened in the practice because when a slave's
master is down, the INFO period for slaves changes to 1 second. However
when a manual failover is attempted immediately after adding slaves
(like in the case of the Sentinel unit test), this problem may happen.

This commit changes the INFO period to 1 second even in the case the
slave's master is not down, but the slave reported to be disconnected
from the master (by publishing, last time we checked, a master
disconnection time field in INFO).

This change is required as a result of an unrelated change in the
replication code that adds a small delay in the master-slave first
synchronization.
2016-07-22 10:51:25 +02:00
antirez
c27fc1eea1 Sentinel: CKQUORUM tests 2015-05-19 12:26:09 +02:00
antirez
e1ca058b82 Sentinel test: more correct sentinels config reset.
In the initialization test for each instance we used to unregister the
old master and register it again to clear the config.
However there is a race condition doing this: as soon as we unregister
and re-register "mymaster", another Sentinel can update the new
configuration with the old state because of gossip "hello" messages.

So the correct procedure is instead, unregister "mymaster" from all the
sentinel instances, and re-register it everywhere again.
2014-06-23 14:07:47 +02:00
antirez
0b9e698647 Sentinel test: tolerate larger delays in init tests. 2014-06-19 15:58:45 +02:00
antirez
1465b21678 Sentinel test: unit 02, avoid some time related false positives. 2014-06-19 15:56:28 +02:00
antirez
b06f34a92c Sentinel test: add manual failover test. 2014-06-19 10:33:12 +02:00
antirez
c102ad59e9 Sentinel test files / directories layout improved.
The test now runs in a self-contained directory.
The general abstractions to run the tests in an environment where
mutliple instances are executed at the same time was extrapolated into
instances.tcl, that will be reused to test Redis Cluster.
2014-04-24 11:08:22 +02:00