From d27fb87b206d36f9adfa8785fdf8386ac2523dad Mon Sep 17 00:00:00 2001 From: Kelvin Clement Mwinuka Date: Mon, 10 Jun 2024 21:38:43 +0800 Subject: [PATCH 1/2] Added longer yields for file sync after snapshot and aof rewrite --- coverage/coverage.out | 114 ++++++++++++------------ internal/modules/admin/commands_test.go | 4 +- 2 files changed, 59 insertions(+), 59 deletions(-) diff --git a/coverage/coverage.out b/coverage/coverage.out index e87a79ec..db988da9 100644 --- a/coverage/coverage.out +++ b/coverage/coverage.out @@ -40,6 +40,61 @@ github.com/echovault/echovault/internal/config/config.go:247.2,249.45 2 0 github.com/echovault/echovault/internal/config/config.go:249.45,251.3 1 0 github.com/echovault/echovault/internal/config/config.go:253.2,253.18 1 0 github.com/echovault/echovault/internal/config/default.go:8.29,38.2 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:45.62,46.36 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:46.36,48.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:51.71,52.36 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:52.36,54.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:57.88,58.36 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:58.36,60.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:63.95,64.36 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:64.36,66.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:69.65,70.36 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:70.36,72.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:75.86,81.52 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:81.52,84.4 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:85.60,85.61 0 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:88.2,88.33 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:88.33,90.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:93.2,93.46 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:93.46,95.17 2 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:95.17,97.4 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:98.3,99.17 2 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:99.17,101.4 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:102.3,102.15 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:105.2,105.19 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:108.52,115.16 5 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:115.16,117.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:120.2,120.44 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:120.44,122.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:124.2,124.46 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:124.46,126.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:128.2,128.44 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:128.44,130.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:133.2,133.39 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:133.39,135.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:137.2,137.12 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:140.45,141.21 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:141.21,143.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:146.2,146.47 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:146.47,148.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:150.2,151.16 2 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:151.16,153.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:155.2,155.17 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:155.17,157.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:159.2,161.49 2 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:161.49,163.3 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:165.2,165.56 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:165.56,167.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:169.2,169.12 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:172.43,176.2 3 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:179.110,181.26 2 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:181.26,182.36 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:182.36,183.12 1 0 +github.com/echovault/echovault/internal/aof/preamble/store.go:185.3,185.43 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:185.43,187.4 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:189.2,189.35 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:189.35,191.3 1 1 +github.com/echovault/echovault/internal/aof/preamble/store.go:192.2,192.14 1 1 github.com/echovault/echovault/internal/aof/log/store.go:46.60,47.34 1 1 github.com/echovault/echovault/internal/aof/log/store.go:47.34,49.3 1 1 github.com/echovault/echovault/internal/aof/log/store.go:52.61,53.34 1 1 @@ -97,61 +152,6 @@ github.com/echovault/echovault/internal/aof/log/store.go:193.2,193.47 1 0 github.com/echovault/echovault/internal/aof/log/store.go:193.47,195.3 1 0 github.com/echovault/echovault/internal/aof/log/store.go:196.2,196.12 1 0 github.com/echovault/echovault/internal/aof/log/store.go:199.41,203.2 3 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:45.62,46.36 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:46.36,48.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:51.71,52.36 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:52.36,54.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:57.88,58.36 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:58.36,60.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:63.95,64.36 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:64.36,66.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:69.65,70.36 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:70.36,72.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:75.86,81.52 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:81.52,84.4 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:85.60,85.61 0 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:88.2,88.33 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:88.33,90.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:93.2,93.46 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:93.46,95.17 2 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:95.17,97.4 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:98.3,99.17 2 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:99.17,101.4 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:102.3,102.15 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:105.2,105.19 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:108.52,115.16 5 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:115.16,117.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:120.2,120.44 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:120.44,122.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:124.2,124.46 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:124.46,126.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:128.2,128.44 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:128.44,130.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:133.2,133.39 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:133.39,135.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:137.2,137.12 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:140.45,141.21 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:141.21,143.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:146.2,146.47 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:146.47,148.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:150.2,151.16 2 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:151.16,153.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:155.2,155.17 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:155.17,157.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:159.2,161.49 2 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:161.49,163.3 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:165.2,165.56 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:165.56,167.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:169.2,169.12 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:172.43,176.2 3 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:179.110,181.26 2 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:181.26,182.36 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:182.36,183.12 1 0 -github.com/echovault/echovault/internal/aof/preamble/store.go:185.3,185.43 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:185.43,187.4 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:189.2,189.35 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:189.35,191.3 1 1 -github.com/echovault/echovault/internal/aof/preamble/store.go:192.2,192.14 1 1 github.com/echovault/echovault/internal/aof/engine.go:50.56,51.30 1 1 github.com/echovault/echovault/internal/aof/engine.go:51.30,53.3 1 1 github.com/echovault/echovault/internal/aof/engine.go:56.57,57.30 1 1 @@ -352,7 +352,7 @@ github.com/echovault/echovault/internal/modules/hash/commands.go:301.38,303.17 2 github.com/echovault/echovault/internal/modules/hash/commands.go:303.17,304.41 1 1 github.com/echovault/echovault/internal/modules/hash/commands.go:304.41,306.13 2 1 github.com/echovault/echovault/internal/modules/hash/commands.go:308.4,308.42 1 1 -github.com/echovault/echovault/internal/modules/hash/commands.go:308.42,311.13 3 0 +github.com/echovault/echovault/internal/modules/hash/commands.go:308.42,311.13 3 1 github.com/echovault/echovault/internal/modules/hash/commands.go:313.4,313.38 1 1 github.com/echovault/echovault/internal/modules/hash/commands.go:313.38,315.13 2 1 github.com/echovault/echovault/internal/modules/hash/commands.go:320.2,320.25 1 1 @@ -1131,7 +1131,7 @@ github.com/echovault/echovault/internal/modules/set/commands.go:251.75,253.16 2 github.com/echovault/echovault/internal/modules/set/commands.go:253.16,255.3 1 0 github.com/echovault/echovault/internal/modules/set/commands.go:257.2,261.37 3 1 github.com/echovault/echovault/internal/modules/set/commands.go:261.37,262.14 1 1 -github.com/echovault/echovault/internal/modules/set/commands.go:262.14,264.4 1 0 +github.com/echovault/echovault/internal/modules/set/commands.go:262.14,264.4 1 1 github.com/echovault/echovault/internal/modules/set/commands.go:265.3,266.10 2 1 github.com/echovault/echovault/internal/modules/set/commands.go:266.10,269.4 1 1 github.com/echovault/echovault/internal/modules/set/commands.go:270.3,270.27 1 1 diff --git a/internal/modules/admin/commands_test.go b/internal/modules/admin/commands_test.go index 432cd3f9..70145f03 100644 --- a/internal/modules/admin/commands_test.go +++ b/internal/modules/admin/commands_test.go @@ -788,7 +788,7 @@ func Test_AdminCommands(t *testing.T) { } // Yield to allow snapshot to complete sync. - ticker := time.NewTicker(20 * time.Millisecond) + ticker := time.NewTicker(200 * time.Millisecond) <-ticker.C ticker.Stop() @@ -829,7 +829,7 @@ func Test_AdminCommands(t *testing.T) { t.Run("Test REWRITEAOF command", func(t *testing.T) { t.Parallel() - ticker := time.NewTicker(100 * time.Millisecond) + ticker := time.NewTicker(200 * time.Millisecond) dataDir := path.Join(".", "testdata", "test_aof") t.Cleanup(func() { From 62bf589a6cf05f5031bbb14ade8e9f399f443b3b Mon Sep 17 00:00:00 2001 From: Kelvin Clement Mwinuka Date: Mon, 10 Jun 2024 21:43:40 +0800 Subject: [PATCH 2/2] Removed parallel testing for load command in acl api module --- echovault/api_acl_test.go | 2 -- 1 file changed, 2 deletions(-) diff --git a/echovault/api_acl_test.go b/echovault/api_acl_test.go index 9cd96294..d0473921 100644 --- a/echovault/api_acl_test.go +++ b/echovault/api_acl_test.go @@ -598,8 +598,6 @@ func TestEchoVault_ACLConfig(t *testing.T) { for _, test := range tests { t.Run(test.name, func(t *testing.T) { - t.Parallel() - // Create server. conf := DefaultConfig() conf.DataDir = ""