diff --git a/cmd/hive/cmd/service.go b/cmd/hive/cmd/service.go index f8df69473..7862db58e 100644 --- a/cmd/hive/cmd/service.go +++ b/cmd/hive/cmd/service.go @@ -266,8 +266,8 @@ var viperblockStartCmd = &cobra.Command{ os.Exit(1) } - // Resolve sharded WAL setting: default true unless explicitly set to false - shardWAL := true + // Resolve sharded WAL setting: default false unless explicitly set to true + shardWAL := false if nodeConfig.Viperblock.ShardWAL != nil { shardWAL = *nodeConfig.Viperblock.ShardWAL } diff --git a/cmd/hive/cmd/templates/hive.toml b/cmd/hive/cmd/templates/hive.toml index 25af32add..e28ed1d81 100644 --- a/cmd/hive/cmd/templates/hive.toml +++ b/cmd/hive/cmd/templates/hive.toml @@ -37,7 +37,7 @@ token = "{{.NatsToken}}" [nodes.{{.Node}}.nats.sub] [nodes.{{.Node}}.viperblock] -shardwal = true +shardwal = false [nodes.{{.Node}}.predastore] host = "{{.BindIP}}:8443" diff --git a/go.mod b/go.mod index ea760bfe1..3f8c32dfb 100644 --- a/go.mod +++ b/go.mod @@ -10,7 +10,7 @@ require ( github.com/kdomanski/iso9660 v0.4.0 github.com/klauspost/cpuid/v2 v2.3.0 github.com/mulgadc/predastore v1.0.0 - github.com/mulgadc/viperblock v1.0.13 + github.com/mulgadc/viperblock v1.0.14 github.com/nats-io/nats-server/v2 v2.11.6 github.com/nats-io/nats.go v1.43.0 github.com/pelletier/go-toml/v2 v2.2.4 diff --git a/go.sum b/go.sum index 74e264e2a..7d628a54c 100644 --- a/go.sum +++ b/go.sum @@ -274,8 +274,8 @@ github.com/modern-go/reflect2 v0.0.0-20180701023420-4b7aa43c6742/go.mod h1:bx2lN github.com/modern-go/reflect2 v1.0.1/go.mod h1:bx2lNnkwVCuqBIxFjflWJWanXIb3RllmbCylyMrvgv0= github.com/mulgadc/predastore v1.0.0 h1:IZ5V/EL+k+zz0zGoTYp+1BgODb43JxHsb/kvORuydKI= github.com/mulgadc/predastore v1.0.0/go.mod h1:x46A1z091hlZkMt3kkcuLSy2PAzSgROr6ft04qcYOU4= -github.com/mulgadc/viperblock v1.0.13 h1:dDH8G4NlQ33t+KQtLmMMOBXgrMfz7qW5N+1jgWHe8F4= -github.com/mulgadc/viperblock v1.0.13/go.mod h1:dV1eRKaIjH8YfuCk2Bd4hxKd3Rx5mWfO6gelJ9SbbeY= +github.com/mulgadc/viperblock v1.0.14 h1:nlnxdRSzoyGEu8ZvE5yvg+HBDqfLcCNYdGcmAUG2O2E= +github.com/mulgadc/viperblock v1.0.14/go.mod h1:dV1eRKaIjH8YfuCk2Bd4hxKd3Rx5mWfO6gelJ9SbbeY= github.com/mwitkow/go-conntrack v0.0.0-20161129095857-cc309e4a2223/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/mwitkow/go-conntrack v0.0.0-20190716064945-2f068394615f/go.mod h1:qRWi+5nqEBWmkhHvq77mSJWrCKwh8bxhgT7d/eI7P4U= github.com/nats-io/jwt/v2 v2.7.4 h1:jXFuDDxs/GQjGDZGhNgH4tXzSUK6WQi2rsj4xmsNOtI= diff --git a/hive/config/config.go b/hive/config/config.go index 500e83b6c..3ecaca7e6 100644 --- a/hive/config/config.go +++ b/hive/config/config.go @@ -79,7 +79,7 @@ type AWSGWConfig struct { } type ViperblockConfig struct { - ShardWAL *bool `mapstructure:"shardwal"` // Enable sharded WAL (default true when nil) + ShardWAL *bool `mapstructure:"shardwal"` // Enable sharded WAL (default false when nil) } type PredastoreConfig struct { diff --git a/hive/config/config_test.go b/hive/config/config_test.go index 57c79f43d..72765edc6 100644 --- a/hive/config/config_test.go +++ b/hive/config/config_test.go @@ -307,7 +307,7 @@ region = "us-east-1" require.NoError(t, err) n := cfg.Nodes["n1"] - assert.Nil(t, n.Viperblock.ShardWAL, "ShardWAL should be nil when not configured (defaults to true in service)") + assert.Nil(t, n.Viperblock.ShardWAL, "ShardWAL should be nil when not configured (defaults to false in service)") } func TestLoadConfig_ViperblockShardWAL_True(t *testing.T) { diff --git a/hive/nbd/nbd.go b/hive/nbd/nbd.go index 709b08a24..61b6797b4 100644 --- a/hive/nbd/nbd.go +++ b/hive/nbd/nbd.go @@ -23,7 +23,7 @@ type NBDKitConfig struct { BaseDir string `json:"base_dir"` Host string `json:"host"` CacheSize int `json:"cache_size"` - ShardWAL bool `json:"shardwal"` // Enable sharded WAL (default true) + ShardWAL bool `json:"shardwal"` // Enable sharded WAL (default false) UseTCP bool `json:"use_tcp"` // If true, use TCP transport; otherwise use Unix socket } diff --git a/hive/services/viperblockd/viperblockd.go b/hive/services/viperblockd/viperblockd.go index 3e10c1e6c..027d41df5 100644 --- a/hive/services/viperblockd/viperblockd.go +++ b/hive/services/viperblockd/viperblockd.go @@ -56,7 +56,7 @@ type Config struct { // Socket is faster for local connections, TCP required for remote/DPU scenarios NBDTransport config.NBDTransport - // ShardWAL enables sharded WAL for mounted volumes (default true) + // ShardWAL enables sharded WAL for mounted volumes (default false) ShardWAL bool mu sync.Mutex