From 7500a733caccea2dbe37db4c7cb7c3e136f3d4ca Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Wed, 22 Oct 2025 13:12:12 -0300 Subject: [PATCH 1/2] Updated typos --- synchronizer/manager.go | 6 +++--- synchronizer/redis.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/synchronizer/manager.go b/synchronizer/manager.go index b2e2d575..73380326 100644 --- a/synchronizer/manager.go +++ b/synchronizer/manager.go @@ -48,7 +48,7 @@ type Manager interface { Start() Stop() IsRunning() bool - StartBGSyng(mstatus chan int, shouldRetry bool, onReady func()) error + StartBGSyng(status chan int, shouldRetry bool, onReady func()) error } // ManagerImpl struct @@ -255,10 +255,10 @@ func (s *ManagerImpl) enableStreaming() { s.hcMonitor.Reset(hc.LargeSegments, int(nextExp.Seconds())) } -func (m *ManagerImpl) StartBGSyng(mstatus chan int, shouldRetry bool, onReady func()) error { +func (m *ManagerImpl) StartBGSyng(status chan int, shouldRetry bool, onReady func()) error { attemptInit := func() bool { go m.Start() - status := <-mstatus + status := <-status switch status { case Ready: onReady() diff --git a/synchronizer/redis.go b/synchronizer/redis.go index 708962af..0ffd8292 100644 --- a/synchronizer/redis.go +++ b/synchronizer/redis.go @@ -41,6 +41,6 @@ func (m *ManagerRedisImpl) IsRunning() bool { return m.running.IsSet() } -func (m *ManagerRedisImpl) StartBGSyng(mstatus chan int, shouldRetry bool, onReady func()) error { +func (m *ManagerRedisImpl) StartBGSyng(status chan int, shouldRetry bool, onReady func()) error { return nil } From 86c10963f8cd839c1b93164f157b4e90dc914fad Mon Sep 17 00:00:00 2001 From: Nadia Mayor Date: Wed, 22 Oct 2025 13:52:53 -0300 Subject: [PATCH 2/2] Updated --- synchronizer/manager.go | 4 ++-- synchronizer/manager_test.go | 6 +++--- synchronizer/redis.go | 2 +- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/synchronizer/manager.go b/synchronizer/manager.go index 73380326..0659eed2 100644 --- a/synchronizer/manager.go +++ b/synchronizer/manager.go @@ -48,7 +48,7 @@ type Manager interface { Start() Stop() IsRunning() bool - StartBGSyng(status chan int, shouldRetry bool, onReady func()) error + StartBGSync(status chan int, shouldRetry bool, onReady func()) error } // ManagerImpl struct @@ -255,7 +255,7 @@ func (s *ManagerImpl) enableStreaming() { s.hcMonitor.Reset(hc.LargeSegments, int(nextExp.Seconds())) } -func (m *ManagerImpl) StartBGSyng(status chan int, shouldRetry bool, onReady func()) error { +func (m *ManagerImpl) StartBGSync(status chan int, shouldRetry bool, onReady func()) error { attemptInit := func() bool { go m.Start() status := <-status diff --git a/synchronizer/manager_test.go b/synchronizer/manager_test.go index dfda0b21..2d1aaceb 100644 --- a/synchronizer/manager_test.go +++ b/synchronizer/manager_test.go @@ -925,7 +925,7 @@ func TestStartBGSyncSuccessFirstTry(t *testing.T) { readyCalled := false onReady := func() { readyCalled = true } - err := manager.StartBGSyng(status, false, onReady) + err := manager.StartBGSync(status, false, onReady) if err != nil { t.Error("Should not return error on successful first try") } @@ -968,7 +968,7 @@ func TestStartBGSyncFailNoSnapshot(t *testing.T) { readyCalled := false onReady := func() { readyCalled = true } - err := manager.StartBGSyng(status, false, onReady) + err := manager.StartBGSync(status, false, onReady) if err != errUnrecoverable { t.Error("Should return errUnrecoverable when sync fails and no snapshot available") } @@ -1011,7 +1011,7 @@ func TestStartBGSyncFailWithSnapshot(t *testing.T) { readyCalled := false onReady := func() { readyCalled = true } - err := manager.StartBGSyng(status, true, onReady) + err := manager.StartBGSync(status, true, onReady) if err != errRetrying { t.Error("Should return errRetrying when sync fails but snapshot is available") } diff --git a/synchronizer/redis.go b/synchronizer/redis.go index 0ffd8292..40f9ebc9 100644 --- a/synchronizer/redis.go +++ b/synchronizer/redis.go @@ -41,6 +41,6 @@ func (m *ManagerRedisImpl) IsRunning() bool { return m.running.IsSet() } -func (m *ManagerRedisImpl) StartBGSyng(status chan int, shouldRetry bool, onReady func()) error { +func (m *ManagerRedisImpl) StartBGSync(status chan int, shouldRetry bool, onReady func()) error { return nil }