From dd82b312887d783cce39d11c279f1bda73440bf8 Mon Sep 17 00:00:00 2001 From: Paul Kuruvilla Date: Mon, 8 Apr 2024 22:20:49 +0100 Subject: [PATCH] updategp --- internal/test_helpers/fixtures/repl-wait/pass | 152 ++++++++--------- internal/test_helpers/fixtures/streams/pass | 154 +++++++++--------- internal/test_repl_master_cmd_prop.go | 4 + 3 files changed, 161 insertions(+), 149 deletions(-) diff --git a/internal/test_helpers/fixtures/repl-wait/pass b/internal/test_helpers/fixtures/repl-wait/pass index 8a396b2c..7def30dc 100644 --- a/internal/test_helpers/fixtures/repl-wait/pass +++ b/internal/test_helpers/fixtures/repl-wait/pass @@ -117,15 +117,15 @@ Debug = true [stage-7] Received bytes: "+OK\r\n" [stage-7] Received RESP value: "OK" [stage-7] Received "OK" -[stage-7] Received OK at 17:47:16.615 -[stage-7] Fetching key "pineapple" at 17:47:16.615 (should not be expired) +[stage-7] Received OK at 22:15:47.010 +[stage-7] Fetching key "pineapple" at 22:15:47.010 (should not be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$5\r\ngrape\r\n" [stage-7] Received RESP value: "grape" [stage-7] Received "grape" [stage-7] Sleeping for 101ms -[stage-7] Fetching key "pineapple" at 17:47:16.719 (should be expired) +[stage-7] Fetching key "pineapple" at 22:15:47.113 (should be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$-1\r\n" @@ -136,19 +136,19 @@ Debug = true [stage-7] Program terminated successfully [stage-8] Running tests for Stage #8: rdb-config -[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391 --dbfilename banana.rdb +[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3508336326 --dbfilename banana.rdb [stage-8] $ redis-cli config get dir [stage-8] Sent bytes: "*3\r\n$6\r\nconfig\r\n$3\r\nget\r\n$3\r\ndir\r\n" -[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391\r\n" -[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391"] -[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4189248391"] +[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3508336326\r\n" +[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3508336326"] +[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3508336326"] [stage-8] Test passed. [stage-8] Terminating program [stage-8] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-9] Running tests for Stage #9: rdb-read-key [stage-9] Created RDB file with single key: "orange" -[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1725286669 --dbfilename pineapple.rdb +[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1473807766 --dbfilename pineapple.rdb [stage-9] $ redis-cli KEYS * [stage-9] Test passed. [stage-9] Terminating program @@ -156,7 +156,7 @@ Debug = true [stage-10] Running tests for Stage #10: rdb-read-string-value [stage-10] Created RDB file with single key-value pair: blueberry="orange" -[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1751575516 --dbfilename pear.rdb +[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles120304331 --dbfilename pear.rdb [stage-10] $ redis-cli GET blueberry [stage-10] Test passed. [stage-10] Terminating program @@ -164,7 +164,7 @@ Debug = true [stage-11] Running tests for Stage #11: rdb-read-multiple-keys [stage-11] Created RDB file with 4 keys: ["grape" "pear" "strawberry" "banana"] -[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1718759447 --dbfilename pineapple.rdb +[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1980839995 --dbfilename pineapple.rdb [stage-11] $ redis-cli KEYS * [stage-11] Test passed. [stage-11] Terminating program @@ -172,7 +172,7 @@ Debug = true [stage-12] Running tests for Stage #12: rdb-read-multiple-string-values [stage-12] Created RDB file with key-value pairs: "grape"="raspberry", "pineapple"="mango", "mango"="blueberry" -[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles634078774 --dbfilename pineapple.rdb +[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4037718428 --dbfilename pineapple.rdb [stage-12] $ redis-cli GET grape [stage-12] $ redis-cli GET pineapple [stage-12] $ redis-cli GET mango @@ -181,7 +181,7 @@ Debug = true [stage-12] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-13] Running tests for Stage #13: rdb-read-value-with-expiry -[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles151254015 --dbfilename banana.rdb +[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles378968894 --dbfilename banana.rdb [stage-13] $ redis-cli GET strawberry [stage-13] $ redis-cli GET pear [stage-13] $ redis-cli GET raspberry @@ -202,9 +202,9 @@ Debug = true [stage-15] $ ./spawn_redis_server.sh [stage-15] client: $ redis-cli INFO replication [stage-15] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:4de6e6d9332a7f75fd36b360420e7e5dcfc91f98\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c5889c60a7ef0bf77aaf492bb66bf666c41498f0\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c5889c60a7ef0bf77aaf492bb66bf666c41498f0\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c5889c60a7ef0bf77aaf492bb66bf666c41498f0\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-15] Found role:master in response. [stage-15] Test passed. [stage-15] Terminating program @@ -244,9 +244,9 @@ Debug = true [stage-17] $ ./spawn_redis_server.sh [stage-17] client: $ redis-cli INFO replication [stage-17] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:c009bd60a974684976582bb1551bc91fbd20e48e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a1597a29690d7d0544d0cf9b4749e57859f8b08a\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a1597a29690d7d0544d0cf9b4749e57859f8b08a\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:a1597a29690d7d0544d0cf9b4749e57859f8b08a\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-17] Found master_replid:xxx in response. [stage-17] Found master_reploffset:0 in response. [stage-17] Test passed. @@ -354,9 +354,9 @@ Debug = true [stage-22] Received "OK" [stage-22] client: $ redis-cli PSYNC ? -1 [stage-22] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-22] client: Received bytes: "+FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0\r\n" -[stage-22] client: Received RESP value: "FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0" -[stage-22] Received "FULLRESYNC 79570564e1424a60a5b384b70229023c20024d65 0" +[stage-22] client: Received bytes: "+FULLRESYNC e77debebca6dab5fe60e22941eece7753a0ce349 0\r\n" +[stage-22] client: Received RESP value: "FULLRESYNC e77debebca6dab5fe60e22941eece7753a0ce349 0" +[stage-22] Received "FULLRESYNC e77debebca6dab5fe60e22941eece7753a0ce349 0" [stage-22] Test passed. [stage-22] Terminating program [stage-22] Program terminated successfully @@ -380,11 +380,11 @@ Debug = true [stage-23] Received "OK" [stage-23] client: $ redis-cli PSYNC ? -1 [stage-23] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-23] client: Received bytes: "+FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0\r\n" -[stage-23] client: Received RESP value: "FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0" -[stage-23] Received "FULLRESYNC afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672 0" +[stage-23] client: Received bytes: "+FULLRESYNC b28ecb2ab0ce21dc45adfdd88c0d76be0432d193 0\r\n" +[stage-23] client: Received RESP value: "FULLRESYNC b28ecb2ab0ce21dc45adfdd88c0d76be0432d193 0" +[stage-23] Received "FULLRESYNC b28ecb2ab0ce21dc45adfdd88c0d76be0432d193 0" [stage-23] Reading RDB file... -[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc2 \x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(afaf4d64cf39e4b12c472bf9a6fc25e6ad9b6672\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffi\x06\"\xba$\xfe'\xd8" +[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0093^\x14f\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(b28ecb2ab0ce21dc45adfdd88c0d76be0432d193\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x9f\x12Β\x9b\xf1\xf6\x8c" [stage-23] Received RDB file [stage-23] Test passed. [stage-23] Terminating program @@ -409,11 +409,11 @@ Debug = true [stage-24] Received "OK" [stage-24] replica: $ redis-cli PSYNC ? -1 [stage-24] replica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-24] replica: Received bytes: "+FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0\r\n" -[stage-24] replica: Received RESP value: "FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0" -[stage-24] Received "FULLRESYNC 768b8481315fa9e1b1b08c12770f83c01c66ebe0 0" +[stage-24] replica: Received bytes: "+FULLRESYNC 4ff4040882ebd19038933138bc70d6c86d5f4f46 0\r\n" +[stage-24] replica: Received RESP value: "FULLRESYNC 4ff4040882ebd19038933138bc70d6c86d5f4f46 0" +[stage-24] Received "FULLRESYNC 4ff4040882ebd19038933138bc70d6c86d5f4f46 0" [stage-24] Reading RDB file... -[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc2\x10S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(768b8481315fa9e1b1b08c12770f83c01c66ebe0\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xd3Mp\xf5\xa1\x99h*" +[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0093^\x14f\xfa\bused-mem\xc2pS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(4ff4040882ebd19038933138bc70d6c86d5f4f46\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xfa\xe4\x9fW\x86\xf8\x8a\xc9" [stage-24] Received RDB file [stage-24] client: $ redis-cli SET foo 123 [stage-24] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -430,14 +430,18 @@ Debug = true [stage-24] client: Received bytes: "+OK\r\n" [stage-24] client: Received RESP value: "OK" [stage-24] Received "OK" +[stage-24] Sent 3 SET commands to master successfully. +[stage-24] replica: Expecting SET foo 123 to be propagated [stage-24] replica: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n" [stage-24] replica: Received RESP value: ["SELECT", "0"] [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" [stage-24] replica: Received RESP value: ["SET", "foo", "123"] [stage-24] Received ["SET", "foo", "123"] +[stage-24] replica: Expecting SET bar 456 to be propagated [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n" [stage-24] replica: Received RESP value: ["SET", "bar", "456"] [stage-24] Received ["SET", "bar", "456"] +[stage-24] replica: Expecting SET baz 789 to be propagated [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n" [stage-24] replica: Received RESP value: ["SET", "baz", "789"] [stage-24] Received ["SET", "baz", "789"] @@ -465,11 +469,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-1: $ redis-cli PSYNC ? -1 [stage-25] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-1: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" -[stage-25] replica-1: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" -[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] replica-1: Received bytes: "+FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0\r\n" +[stage-25] replica-1: Received RESP value: "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" +[stage-25] Received "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" [stage-25] Reading RDB file... -[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\xc20S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xfff4\n\xafN\xcbf\x8d" +[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0094^\x14f\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2ab0785a0e607ee54c211af80bd41dcfa804ad17\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xf3\xf5IGQ\xf2\xb5>" [stage-25] Received RDB file [stage-25] Creating replica: 2 [stage-25] replica-2: $ redis-cli PING @@ -489,11 +493,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-2: $ redis-cli PSYNC ? -1 [stage-25] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-2: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" -[stage-25] replica-2: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" -[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] replica-2: Received bytes: "+FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0\r\n" +[stage-25] replica-2: Received RESP value: "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" +[stage-25] Received "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" [stage-25] Reading RDB file... -[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem\u00a0:\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa72lt\x90%\x8b\xee" +[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0094^\x14f\xfa\bused-mem\xc2\xc0:\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2ab0785a0e607ee54c211af80bd41dcfa804ad17\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff2\xf3/\x9c\x8f\x1cX]" [stage-25] Received RDB file [stage-25] Creating replica: 3 [stage-25] replica-3: $ redis-cli PING @@ -513,11 +517,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-3: $ redis-cli PSYNC ? -1 [stage-25] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-3: Received bytes: "+FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0\r\n" -[stage-25] replica-3: Received RESP value: "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" -[stage-25] Received "FULLRESYNC 1cf282adfde9e6a53633b6c574d104e470d2de38 0" +[stage-25] replica-3: Received bytes: "+FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0\r\n" +[stage-25] replica-3: Received RESP value: "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" +[stage-25] Received "FULLRESYNC 2ab0785a0e607ee54c211af80bd41dcfa804ad17 0" [stage-25] Reading RDB file... -[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2%\x88\rf\xfa\bused-mem°I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1cf282adfde9e6a53633b6c574d104e470d2de38\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xf3S\xa7\x97\xf6-\x81\xfc" +[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0094^\x14f\xfa\bused-mem\xc2\xd0I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(2ab0785a0e607ee54c211af80bd41dcfa804ad17\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xfff\x92\xe4\x7f\xe9\x14RO" [stage-25] Received RDB file [stage-25] client: $ redis-cli SET foo 123 [stage-25] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -746,11 +750,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-1: $ redis-cli PSYNC ? -1 [stage-30] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-1: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" -[stage-30] replica-1: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" -[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] replica-1: Received bytes: "+FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0\r\n" +[stage-30] replica-1: Received RESP value: "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" +[stage-30] Received "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" [stage-30] Reading RDB file... -[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffc\x02\xbb\xff\xa6!\xc7u" +[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0095^\x14f\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bd3ce4baa33bff0044c28528631bc0df8de0b091\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffȨA?\x89)\xafB" [stage-30] Received RDB file [stage-30] Creating replica: 2 [stage-30] replica-2: $ redis-cli PING @@ -770,11 +774,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-2: $ redis-cli PSYNC ? -1 [stage-30] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-2: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" -[stage-30] replica-2: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" -[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] replica-2: Received bytes: "+FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0\r\n" +[stage-30] replica-2: Received RESP value: "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" +[stage-30] Received "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" [stage-30] Reading RDB file... -[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xd0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffY\x82\x84\x84\x0f!\xeeZ" +[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0095^\x14f\xfa\bused-mem\xc2\xf0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bd3ce4baa33bff0044c28528631bc0df8de0b091\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xf2(~D )\x86m" [stage-30] Received RDB file [stage-30] Creating replica: 3 [stage-30] replica-3: $ redis-cli PING @@ -794,11 +798,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-3: $ redis-cli PSYNC ? -1 [stage-30] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-3: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" -[stage-30] replica-3: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" -[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] replica-3: Received bytes: "+FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0\r\n" +[stage-30] replica-3: Received RESP value: "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" +[stage-30] Received "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" [stage-30] Reading RDB file... -[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffa\xa5\x1c\xcc\xe6\xeeyt" +[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0095^\x14f\xfa\bused-mem\xc2\xf0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bd3ce4baa33bff0044c28528631bc0df8de0b091\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xca\x0f\xe6\f\xc9\xe6\x11C" [stage-30] Received RDB file [stage-30] Creating replica: 4 [stage-30] replica-4: $ redis-cli PING @@ -818,11 +822,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-4: $ redis-cli PSYNC ? -1 [stage-30] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-4: Received bytes: "+FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0\r\n" -[stage-30] replica-4: Received RESP value: "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" -[stage-30] Received "FULLRESYNC c2d7a200e607a1548603dcd347178fcd063afa04 0" +[stage-30] replica-4: Received bytes: "+FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0\r\n" +[stage-30] replica-4: Received RESP value: "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" +[stage-30] Received "FULLRESYNC bd3ce4baa33bff0044c28528631bc0df8de0b091 0" [stage-30] Reading RDB file... -[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2'\x88\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(c2d7a200e607a1548603dcd347178fcd063afa04\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xd4\xe3\x05\x90?\xf01\xaa" +[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0095^\x14f\xfa\bused-mem\xc2\x00\x8c\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(bd3ce4baa33bff0044c28528631bc0df8de0b091\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffo\x1dwJ\xe0/|\xb8" [stage-30] Received RDB file [stage-30] client: $ redis-cli WAIT 3 500 [stage-30] client: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n" @@ -869,11 +873,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-1: $ redis-cli PSYNC ? -1 [stage-31] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-1: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" -[stage-31] replica-1: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" -[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] replica-1: Received bytes: "+FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0\r\n" +[stage-31] replica-1: Received RESP value: "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" +[stage-31] Received "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" [stage-31] Reading RDB file... -[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xaf\xf0e\xf46&\xa3\xa8" +[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0097^\x14f\xfa\bused-mem\xc2@\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(a779f42ba9b8169c7a5130bf90b1f47406070a49\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa3\xf4Q\xaf\x8f\x96h\x17" [stage-31] Received RDB file [stage-31] Creating replica: 2 [stage-31] replica-2: $ redis-cli PING @@ -893,11 +897,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-2: $ redis-cli PSYNC ? -1 [stage-31] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-2: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" -[stage-31] replica-2: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" -[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] replica-2: Received bytes: "+FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0\r\n" +[stage-31] replica-2: Received RESP value: "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" +[stage-31] Received "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" [stage-31] Reading RDB file... -[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2й\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x12\xfc\xb8l\xe8\xdau\xf6" +[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0097^\x14f\xfa\bused-mem\xc2\xd0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(a779f42ba9b8169c7a5130bf90b1f47406070a49\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x99tn\xd4&\x96A8" [stage-31] Received RDB file [stage-31] Creating replica: 3 [stage-31] replica-3: $ redis-cli PING @@ -917,11 +921,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-3: $ redis-cli PSYNC ? -1 [stage-31] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-3: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" -[stage-31] replica-3: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" -[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] replica-3: Received bytes: "+FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0\r\n" +[stage-31] replica-3: Received RESP value: "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" +[stage-31] Received "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" [stage-31] Reading RDB file... -[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xadW\xc2\xc7v\xe9\x1d\xa9" +[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0097^\x14f\xfa\bused-mem\xc2\xd0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(a779f42ba9b8169c7a5130bf90b1f47406070a49\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa1S\xf6\x9c\xcfY\xd6\x16" [stage-31] Received RDB file [stage-31] Creating replica: 4 [stage-31] replica-4: $ redis-cli PING @@ -941,11 +945,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-4: $ redis-cli PSYNC ? -1 [stage-31] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-4: Received bytes: "+FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0\r\n" -[stage-31] replica-4: Received RESP value: "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" -[stage-31] Received "FULLRESYNC 5d7e55a2194e32c15a4950030af2bed5824120d3 0" +[stage-31] replica-4: Received bytes: "+FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0\r\n" +[stage-31] replica-4: Received RESP value: "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" +[stage-31] Received "FULLRESYNC a779f42ba9b8169c7a5130bf90b1f47406070a49 0" [stage-31] Reading RDB file... -[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2)\x88\rf\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(5d7e55a2194e32c15a4950030af2bed5824120d3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x18\x11ۛ\xaf\xf7Uw" +[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u0097^\x14f\xfa\bused-mem\xc2\xe0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(a779f42ba9b8169c7a5130bf90b1f47406070a49\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x14\x15\xef\xc0\x16G\x9e\xc8" [stage-31] Received RDB file [stage-31] client: $ redis-cli SET foo 123 [stage-31] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -1038,7 +1042,7 @@ Debug = true [stage-31] Received ["REPLCONF", "GETACK", "*"] [stage-31] client: Received bytes: ":3\r\n" [stage-31] client: Received RESP value: 3 -[stage-31] WAIT command returned after 2106 ms +[stage-31] WAIT command returned after 2099 ms [stage-31] Test passed. [stage-31] Terminating program [stage-31] Program terminated successfully diff --git a/internal/test_helpers/fixtures/streams/pass b/internal/test_helpers/fixtures/streams/pass index 7cf3c392..77006dde 100644 --- a/internal/test_helpers/fixtures/streams/pass +++ b/internal/test_helpers/fixtures/streams/pass @@ -117,15 +117,15 @@ Debug = true [stage-7] Received bytes: "+OK\r\n" [stage-7] Received RESP value: "OK" [stage-7] Received "OK" -[stage-7] Received OK at 17:48:20.952 -[stage-7] Fetching key "pineapple" at 17:48:20.952 (should not be expired) +[stage-7] Received OK at 22:16:12.649 +[stage-7] Fetching key "pineapple" at 22:16:12.649 (should not be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$5\r\ngrape\r\n" [stage-7] Received RESP value: "grape" [stage-7] Received "grape" [stage-7] Sleeping for 101ms -[stage-7] Fetching key "pineapple" at 17:48:21.056 (should be expired) +[stage-7] Fetching key "pineapple" at 22:16:12.752 (should be expired) [stage-7] $ redis-cli get pineapple [stage-7] Sent bytes: "*2\r\n$3\r\nget\r\n$9\r\npineapple\r\n" [stage-7] Received bytes: "$-1\r\n" @@ -136,19 +136,19 @@ Debug = true [stage-7] Program terminated successfully [stage-8] Running tests for Stage #8: rdb-config -[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484 --dbfilename banana.rdb +[stage-8] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3659240720 --dbfilename banana.rdb [stage-8] $ redis-cli config get dir [stage-8] Sent bytes: "*3\r\n$6\r\nconfig\r\n$3\r\nget\r\n$3\r\ndir\r\n" -[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484\r\n" -[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484"] -[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1186197484"] +[stage-8] Received bytes: "*2\r\n$3\r\ndir\r\n$75\r\n/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3659240720\r\n" +[stage-8] Received RESP value: ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3659240720"] +[stage-8] Received ["dir", "/private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3659240720"] [stage-8] Test passed. [stage-8] Terminating program [stage-8] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-9] Running tests for Stage #9: rdb-read-key [stage-9] Created RDB file with single key: "orange" -[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles2636860651 --dbfilename pineapple.rdb +[stage-9] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1791821092 --dbfilename pineapple.rdb [stage-9] $ redis-cli KEYS * [stage-9] Test passed. [stage-9] Terminating program @@ -156,7 +156,7 @@ Debug = true [stage-10] Running tests for Stage #10: rdb-read-string-value [stage-10] Created RDB file with single key-value pair: blueberry="orange" -[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1561295186 --dbfilename pear.rdb +[stage-10] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1808846280 --dbfilename pear.rdb [stage-10] $ redis-cli GET blueberry [stage-10] Test passed. [stage-10] Terminating program @@ -164,7 +164,7 @@ Debug = true [stage-11] Running tests for Stage #11: rdb-read-multiple-keys [stage-11] Created RDB file with 4 keys: ["grape" "pear" "strawberry" "banana"] -[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1566131716 --dbfilename pineapple.rdb +[stage-11] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1019128438 --dbfilename pineapple.rdb [stage-11] $ redis-cli KEYS * [stage-11] Test passed. [stage-11] Terminating program @@ -172,7 +172,7 @@ Debug = true [stage-12] Running tests for Stage #12: rdb-read-multiple-string-values [stage-12] Created RDB file with key-value pairs: "grape"="raspberry", "pineapple"="mango", "mango"="blueberry" -[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles3986972646 --dbfilename pineapple.rdb +[stage-12] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles106729023 --dbfilename pineapple.rdb [stage-12] $ redis-cli GET grape [stage-12] $ redis-cli GET pineapple [stage-12] $ redis-cli GET mango @@ -181,7 +181,7 @@ Debug = true [stage-12] Error terminating program: 'program failed to exit in 2 seconds after receiving sigterm' [stage-13] Running tests for Stage #13: rdb-read-value-with-expiry -[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles4076755790 --dbfilename banana.rdb +[stage-13] $ ./spawn_redis_server.sh --dir /private/var/folders/f1/bs24_53x44j26flrfvyg416m0000gn/T/rdbfiles1583110213 --dbfilename banana.rdb [stage-13] $ redis-cli GET strawberry [stage-13] $ redis-cli GET pear [stage-13] $ redis-cli GET raspberry @@ -202,9 +202,9 @@ Debug = true [stage-15] $ ./spawn_redis_server.sh [stage-15] client: $ redis-cli INFO replication [stage-15] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:084643393818046a1acfdd87b65e9925c1d769c8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d018552a993aaac26f457db3071d54924db7deb6\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-15] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d018552a993aaac26f457db3071d54924db7deb6\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-15] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:d018552a993aaac26f457db3071d54924db7deb6\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-15] Found role:master in response. [stage-15] Test passed. [stage-15] Terminating program @@ -244,9 +244,9 @@ Debug = true [stage-17] $ ./spawn_redis_server.sh [stage-17] client: $ redis-cli INFO replication [stage-17] client: Sent bytes: "*2\r\n$4\r\nINFO\r\n$11\r\nreplication\r\n" -[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" -[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" -[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:e10cacffe73c0d2b4ff12f85488060b33d4c2bf8\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] client: Received bytes: "$349\r\n# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:f21b3426022f891ab645580b8b22be87c613c68e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n\r\n" +[stage-17] client: Received RESP value: "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:f21b3426022f891ab645580b8b22be87c613c68e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" +[stage-17] Received "# Replication\r\nrole:master\r\nconnected_slaves:0\r\nmaster_failover_state:no-failover\r\nmaster_replid:f21b3426022f891ab645580b8b22be87c613c68e\r\nmaster_replid2:0000000000000000000000000000000000000000\r\nmaster_repl_offset:0\r\nsecond_repl_offset:-1\r\nrepl_backlog_active:0\r\nrepl_backlog_size:1048576\r\nrepl_backlog_first_byte_offset:0\r\nrepl_backlog_histlen:0\r\n" [stage-17] Found master_replid:xxx in response. [stage-17] Found master_reploffset:0 in response. [stage-17] Test passed. @@ -354,9 +354,9 @@ Debug = true [stage-22] Received "OK" [stage-22] client: $ redis-cli PSYNC ? -1 [stage-22] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-22] client: Received bytes: "+FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0\r\n" -[stage-22] client: Received RESP value: "FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0" -[stage-22] Received "FULLRESYNC fbc4def2aa8d5c4e01565f318d08e6bb488d2a47 0" +[stage-22] client: Received bytes: "+FULLRESYNC fb2fb0968aa35ad5ea168c4242aa56feae0441a5 0\r\n" +[stage-22] client: Received RESP value: "FULLRESYNC fb2fb0968aa35ad5ea168c4242aa56feae0441a5 0" +[stage-22] Received "FULLRESYNC fb2fb0968aa35ad5ea168c4242aa56feae0441a5 0" [stage-22] Test passed. [stage-22] Terminating program [stage-22] Program terminated successfully @@ -380,11 +380,11 @@ Debug = true [stage-23] Received "OK" [stage-23] client: $ redis-cli PSYNC ? -1 [stage-23] client: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-23] client: Received bytes: "+FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0\r\n" -[stage-23] client: Received RESP value: "FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0" -[stage-23] Received "FULLRESYNC 1d1dedb646da15e614b99758b88b80f86a7b3ede 0" +[stage-23] client: Received bytes: "+FULLRESYNC 9fdd67679b02e6cf561df24fa086d1d4b682759f 0\r\n" +[stage-23] client: Received RESP value: "FULLRESYNC 9fdd67679b02e6cf561df24fa086d1d4b682759f 0" +[stage-23] Received "FULLRESYNC 9fdd67679b02e6cf561df24fa086d1d4b682759f 0" [stage-23] Reading RDB file... -[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2e\x88\rf\xfa\bused-mem\xc2 \x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(1d1dedb646da15e614b99758b88b80f86a7b3ede\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffr\xc3\xd8\xc7\xf8\x9c\xf9n" +[stage-23] client: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u00ad^\x14f\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(9fdd67679b02e6cf561df24fa086d1d4b682759f\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xf0\x87L>@P\x936" [stage-23] Received RDB file [stage-23] Test passed. [stage-23] Terminating program @@ -409,11 +409,11 @@ Debug = true [stage-24] Received "OK" [stage-24] replica: $ redis-cli PSYNC ? -1 [stage-24] replica: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-24] replica: Received bytes: "+FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0\r\n" -[stage-24] replica: Received RESP value: "FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0" -[stage-24] Received "FULLRESYNC d3fda7d996479245b1c1f590f097282bef62b4e5 0" +[stage-24] replica: Received bytes: "+FULLRESYNC 01a0539538d16994b9e74a2f87572d2cbd526305 0\r\n" +[stage-24] replica: Received RESP value: "FULLRESYNC 01a0539538d16994b9e74a2f87572d2cbd526305 0" +[stage-24] Received "FULLRESYNC 01a0539538d16994b9e74a2f87572d2cbd526305 0" [stage-24] Reading RDB file... -[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2e\x88\rf\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(d3fda7d996479245b1c1f590f097282bef62b4e5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffFa\xd4\xce\x1e/\xa31" +[stage-24] replica: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u00ad^\x14f\xfa\bused-mem\xc2PS\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(01a0539538d16994b9e74a2f87572d2cbd526305\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff0\xc2\xe3gD\xf9\xd0\xdc" [stage-24] Received RDB file [stage-24] client: $ redis-cli SET foo 123 [stage-24] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -430,14 +430,18 @@ Debug = true [stage-24] client: Received bytes: "+OK\r\n" [stage-24] client: Received RESP value: "OK" [stage-24] Received "OK" +[stage-24] Sent 3 SET commands to master successfully. +[stage-24] replica: Expecting SET foo 123 to be propagated [stage-24] replica: Received bytes: "*2\r\n$6\r\nSELECT\r\n$1\r\n0\r\n" [stage-24] replica: Received RESP value: ["SELECT", "0"] [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" [stage-24] replica: Received RESP value: ["SET", "foo", "123"] [stage-24] Received ["SET", "foo", "123"] +[stage-24] replica: Expecting SET bar 456 to be propagated [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbar\r\n$3\r\n456\r\n" [stage-24] replica: Received RESP value: ["SET", "bar", "456"] [stage-24] Received ["SET", "bar", "456"] +[stage-24] replica: Expecting SET baz 789 to be propagated [stage-24] replica: Received bytes: "*3\r\n$3\r\nSET\r\n$3\r\nbaz\r\n$3\r\n789\r\n" [stage-24] replica: Received RESP value: ["SET", "baz", "789"] [stage-24] Received ["SET", "baz", "789"] @@ -465,11 +469,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-1: $ redis-cli PSYNC ? -1 [stage-25] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-1: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" -[stage-25] replica-1: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" -[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] replica-1: Received bytes: "+FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0\r\n" +[stage-25] replica-1: Received RESP value: "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" +[stage-25] Received "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" [stage-25] Reading RDB file... -[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem°S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff4\xbao\xf4\x8f\xacH\xf0" +[stage-25] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u00ad^\x14f\xfa\bused-mem\xc20S\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffw\xa4H8\x95\f\xef\xef" [stage-25] Received RDB file [stage-25] Creating replica: 2 [stage-25] replica-2: $ redis-cli PING @@ -489,11 +493,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-2: $ redis-cli PSYNC ? -1 [stage-25] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-2: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" -[stage-25] replica-2: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" -[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] replica-2: Received bytes: "+FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0\r\n" +[stage-25] replica-2: Received RESP value: "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" +[stage-25] Received "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" [stage-25] Reading RDB file... -[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem\xc2 \xc3\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffJ\x17s\x84\xcfq\xcd\xcc" +[stage-25] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\u00ad^\x14f\xfa\bused-mem\u00a0:\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb6\xa2.\xe3K\xe2\x02\x8c" [stage-25] Received RDB file [stage-25] Creating replica: 3 [stage-25] replica-3: $ redis-cli PING @@ -513,11 +517,11 @@ Debug = true [stage-25] Received "OK" [stage-25] replica-3: $ redis-cli PSYNC ? -1 [stage-25] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-25] replica-3: Received bytes: "+FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0\r\n" -[stage-25] replica-3: Received RESP value: "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" -[stage-25] Received "FULLRESYNC 0793b1d00a2832b666de0b9b80965901c3675f7a 0" +[stage-25] replica-3: Received bytes: "+FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0\r\n" +[stage-25] replica-3: Received RESP value: "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" +[stage-25] Received "FULLRESYNC 7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a 0" [stage-25] Reading RDB file... -[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2f\x88\rf\xfa\bused-mem\xc20J\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(0793b1d00a2832b666de0b9b80965901c3675f7a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x95<\xd8K\xf1\xb9\xf6\xfb" +[stage-25] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime®^\x14f\xfa\bused-mem°I\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7f0c3044ca8ffb4ed4d07bc2b439ab69b4fa895a\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x96N\x9b\xf4s\x1e\xaa\xd7" [stage-25] Received RDB file [stage-25] client: $ redis-cli SET foo 123 [stage-25] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -746,11 +750,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-1: $ redis-cli PSYNC ? -1 [stage-30] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-1: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" -[stage-30] replica-1: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" -[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] replica-1: Received bytes: "+FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0\r\n" +[stage-30] replica-1: Received RESP value: "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" +[stage-30] Received "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" [stage-30] Reading RDB file... -[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2`\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa1r\x11p?\xcfԍ" +[stage-30] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime¯^\x14f\xfa\bused-mem\xc2\xe0\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(e9c67653a22ce44c73b0658ac2ebc023a39605c5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff9\xeb͜Ib\xb7\xf2" [stage-30] Received RDB file [stage-30] Creating replica: 2 [stage-30] replica-2: $ redis-cli PING @@ -770,11 +774,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-2: $ redis-cli PSYNC ? -1 [stage-30] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-2: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" -[stage-30] replica-2: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" -[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] replica-2: Received bytes: "+FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0\r\n" +[stage-30] replica-2: Received RESP value: "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" +[stage-30] Received "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" [stage-30] Reading RDB file... -[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\xf0\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x9b\xf2.\v\x96\xcf\xfd\xa2" +[stage-30] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime¯^\x14f\xfa\bused-mem\xc2p\xf6\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(e9c67653a22ce44c73b0658ac2ebc023a39605c5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff7\x8a\xe8`&\x91ǧ" [stage-30] Received RDB file [stage-30] Creating replica: 3 [stage-30] replica-3: $ redis-cli PING @@ -794,11 +798,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-3: $ redis-cli PSYNC ? -1 [stage-30] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-3: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" -[stage-30] replica-3: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" -[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] replica-3: Received bytes: "+FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0\r\n" +[stage-30] replica-3: Received RESP value: "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" +[stage-30] Received "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" [stage-30] Reading RDB file... -[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\xf0@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xa3նC\x7f\x00j\x8c" +[stage-30] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime¯^\x14f\xfa\bused-mem\xc2pA\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(e9c67653a22ce44c73b0658ac2ebc023a39605c5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x0eb\x11\x1a\x85\xe1\t<" [stage-30] Received RDB file [stage-30] Creating replica: 4 [stage-30] replica-4: $ redis-cli PING @@ -818,11 +822,11 @@ Debug = true [stage-30] Received "OK" [stage-30] replica-4: $ redis-cli PSYNC ? -1 [stage-30] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-30] replica-4: Received bytes: "+FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0\r\n" -[stage-30] replica-4: Received RESP value: "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" -[stage-30] Received "FULLRESYNC 7125b4edc4880903dd0b5e08ac6700ea2ceee900 0" +[stage-30] replica-4: Received bytes: "+FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0\r\n" +[stage-30] replica-4: Received RESP value: "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" +[stage-30] Received "FULLRESYNC e9c67653a22ce44c73b0658ac2ebc023a39605c5 0" [stage-30] Reading RDB file... -[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2g\x88\rf\xfa\bused-mem\xc2\x00\x8c\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(7125b4edc4880903dd0b5e08ac6700ea2ceee900\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x06\xc7'\x05V\xc9\aw" +[stage-30] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime¯^\x14f\xfa\bused-mem\u0080\x8c\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(e9c67653a22ce44c73b0658ac2ebc023a39605c5\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x9e^\xfb\xe9 dd\b" [stage-30] Received RDB file [stage-30] client: $ redis-cli WAIT 3 500 [stage-30] client: Sent bytes: "*3\r\n$4\r\nWAIT\r\n$1\r\n3\r\n$3\r\n500\r\n" @@ -869,11 +873,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-1: $ redis-cli PSYNC ? -1 [stage-31] replica-1: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-1: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" -[stage-31] replica-1: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" -[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] replica-1: Received bytes: "+FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0\r\n" +[stage-31] replica-1: Received RESP value: "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" +[stage-31] Received "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" [stage-31] Reading RDB file... -[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\xc2\x00\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8d(\x17\x14\x86\xf5e\xcd" +[stage-31] replica-1: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime°^\x14f\xfa\bused-mem\xc2\x00\x0e\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(092b55e2e9046b6afad7ada7fbb652a98a4e6047\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8e\xdd\xc0Ċ/ \x96" [stage-31] Received RDB file [stage-31] Creating replica: 2 [stage-31] replica-2: $ redis-cli PING @@ -893,11 +897,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-2: $ redis-cli PSYNC ? -1 [stage-31] replica-2: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-2: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" -[stage-31] replica-2: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" -[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] replica-2: Received bytes: "+FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0\r\n" +[stage-31] replica-2: Received RESP value: "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" +[stage-31] Received "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" [stage-31] Reading RDB file... -[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u0090\xb9\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff0$ʌX\t\xb3\x93" +[stage-31] replica-2: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime°^\x14f\xfa\bused-mem\u0090\xf5\x12\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(092b55e2e9046b6afad7ada7fbb652a98a4e6047\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xb4]\xff\xbf#/\t\xb9" [stage-31] Received RDB file [stage-31] Creating replica: 3 [stage-31] replica-3: $ redis-cli PING @@ -917,11 +921,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-3: $ redis-cli PSYNC ? -1 [stage-31] replica-3: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-3: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" -[stage-31] replica-3: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" -[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] replica-3: Received bytes: "+FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0\r\n" +[stage-31] replica-3: Received RESP value: "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" +[stage-31] Received "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" [stage-31] Reading RDB file... -[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u0090@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\x8f\x8f\xb0'\xc6:\xdb\xcc" +[stage-31] replica-3: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime±^\x14f\xfa\bused-mem\u0090@\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(092b55e2e9046b6afad7ada7fbb652a98a4e6047\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xffy\x8f?\x931Q\xc8I" [stage-31] Received RDB file [stage-31] Creating replica: 4 [stage-31] replica-4: $ redis-cli PING @@ -941,11 +945,11 @@ Debug = true [stage-31] Received "OK" [stage-31] replica-4: $ redis-cli PSYNC ? -1 [stage-31] replica-4: Sent bytes: "*3\r\n$5\r\nPSYNC\r\n$1\r\n?\r\n$2\r\n-1\r\n" -[stage-31] replica-4: Received bytes: "+FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0\r\n" -[stage-31] replica-4: Received RESP value: "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" -[stage-31] Received "FULLRESYNC ecaddcb0ee7bfd23938f9b880a741890a011c2b3 0" +[stage-31] replica-4: Received bytes: "+FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0\r\n" +[stage-31] replica-4: Received RESP value: "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" +[stage-31] Received "FULLRESYNC 092b55e2e9046b6afad7ada7fbb652a98a4e6047 0" [stage-31] Reading RDB file... -[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime\xc2i\x88\rf\xfa\bused-mem\u00a0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(ecaddcb0ee7bfd23938f9b880a741890a011c2b3\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff:ɩ{\x1f$\x93\x12" +[stage-31] replica-4: Received bytes: "$171\r\nREDIS0011\xfa\tredis-ver\x057.2.0\xfa\nredis-bits\xc0@\xfa\x05ctime±^\x14f\xfa\bused-mem\u00a0\x8b\x13\x00\xfa\x0erepl-stream-db\xc0\x00\xfa\arepl-id(092b55e2e9046b6afad7ada7fbb652a98a4e6047\xfa\vrepl-offset\xc0\x00\xfa\baof-base\xc0\x00\xff\xcc\xc9&\xcf\xe8O\x80\x97" [stage-31] Received RDB file [stage-31] client: $ redis-cli SET foo 123 [stage-31] client: Sent bytes: "*3\r\n$3\r\nSET\r\n$3\r\nfoo\r\n$3\r\n123\r\n" @@ -1038,7 +1042,7 @@ Debug = true [stage-31] Received ["REPLCONF", "GETACK", "*"] [stage-31] client: Received bytes: ":3\r\n" [stage-31] client: Received RESP value: 3 -[stage-31] WAIT command returned after 2100 ms +[stage-31] WAIT command returned after 2104 ms [stage-31] Test passed. [stage-31] Terminating program [stage-31] Program terminated successfully @@ -1096,7 +1100,7 @@ Debug = true [stage-36] Running tests for Stage #36: streams-xadd-full-autoid [stage-36] $ ./spawn_redis_server.sh [stage-36] $ redis-cli xadd "pear" * foo bar -[stage-36] Received response: ""1712162925251-0"" +[stage-36] Received response: ""1712610996491-0"" [stage-36] The first part of the ID is a valid unix milliseconds timestamp [stage-36] The second part of the ID is a valid sequence number [stage-36] Test passed. diff --git a/internal/test_repl_master_cmd_prop.go b/internal/test_repl_master_cmd_prop.go index 4110d134..4398927f 100644 --- a/internal/test_repl_master_cmd_prop.go +++ b/internal/test_repl_master_cmd_prop.go @@ -62,8 +62,12 @@ func testReplMasterCmdProp(stageHarness *test_case_harness.TestCaseHarness) erro } } + logger.Successf("Sent 3 SET commands to master successfully.") + // We then assert that as a replica we receive the SET commands in order for i := 1; i <= len(kvMap); i++ { + logger.Infof("replica: Expecting SET %s %s to be propagated", kvMap[i][0], kvMap[i][1]) + receiveCommandTestCase := &test_cases.ReceiveValueTestCase{ Assertion: resp_assertions.NewCommandAssertion("SET", kvMap[i][0], kvMap[i][1]), ShouldSkipUnreadDataCheck: i < len(kvMap), // Except in the last case, we're expecting more SET commands to be present