From 2c8af22898519ea3939ecc8af9d58d140a1d7313 Mon Sep 17 00:00:00 2001 From: Marc Barlo Date: Wed, 5 May 2021 10:01:11 -0700 Subject: [PATCH 1/2] init applyLockingClient when repo locking is disabled --- server/server.go | 1 + 1 file changed, 1 insertion(+) diff --git a/server/server.go b/server/server.go index d872e68d5e..7512d912c8 100644 --- a/server/server.go +++ b/server/server.go @@ -303,6 +303,7 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) { var applyLockingClient locking.ApplyLocker if userConfig.DisableRepoLocking { lockingClient = locking.NewNoOpLocker() + applyLockingClient = locking.NewApplyClient(boltdb, userConfig.DisableApply) } else { lockingClient = locking.NewClient(boltdb) applyLockingClient = locking.NewApplyClient(boltdb, userConfig.DisableApply) From 50b2df95a86946715f6093badaec7eabaea0d488 Mon Sep 17 00:00:00 2001 From: Marc Barlo Date: Wed, 5 May 2021 10:06:15 -0700 Subject: [PATCH 2/2] move applyingLockingClient init out --- server/server.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/server/server.go b/server/server.go index 7512d912c8..5b18757684 100644 --- a/server/server.go +++ b/server/server.go @@ -303,11 +303,10 @@ func NewServer(userConfig UserConfig, config Config) (*Server, error) { var applyLockingClient locking.ApplyLocker if userConfig.DisableRepoLocking { lockingClient = locking.NewNoOpLocker() - applyLockingClient = locking.NewApplyClient(boltdb, userConfig.DisableApply) } else { lockingClient = locking.NewClient(boltdb) - applyLockingClient = locking.NewApplyClient(boltdb, userConfig.DisableApply) } + applyLockingClient = locking.NewApplyClient(boltdb, userConfig.DisableApply) workingDirLocker := events.NewDefaultWorkingDirLocker() var workingDir events.WorkingDir = &events.FileWorkspace{