GODT-2085: Ensure minimum sync worker count

Make sure that we are at least using 16 workers for sync, otherwise
multiply the current sync worker count by 2.

Finally, this patch also logs the duration of the time it takes to
transfer all the messages from the server.
This commit is contained in:
Leander Beernaert
2022-11-22 15:21:39 +01:00
parent 57e9310510
commit 4b6d0d035e
3 changed files with 30 additions and 7 deletions

View File

@ -18,7 +18,6 @@
package vault_test
import (
"runtime"
"testing"
"github.com/Masterminds/semver/v3"
@ -222,6 +221,7 @@ func TestVault_Settings_SyncWorkers(t *testing.T) {
// create a new test vault.
s := newVault(t)
require.Equal(t, runtime.NumCPU(), s.SyncWorkers())
require.Equal(t, runtime.NumCPU(), s.SyncAttPool())
syncWorkers := vault.GetDefaultSyncWorkerCount()
require.Equal(t, syncWorkers, s.SyncWorkers())
require.Equal(t, syncWorkers, s.SyncAttPool())
}