mirror of
https://github.com/mulgadc/spinifex.git
synced 2026-10-15 17:11:30 +00:00
fix: disable sharded WAL by default, bump viperblock v1.0.14
Sharded WAL causes incomplete write errors in E2E tests. Disable by default in hive.toml template, service.go fallback, and viperblock constructor. Can be re-enabled via hive.toml shardwal=true.
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
@@ -37,7 +37,7 @@ token = "{{.NatsToken}}"
|
||||
[nodes.{{.Node}}.nats.sub]
|
||||
|
||||
[nodes.{{.Node}}.viperblock]
|
||||
shardwal = true
|
||||
shardwal = false
|
||||
|
||||
[nodes.{{.Node}}.predastore]
|
||||
host = "{{.BindIP}}:8443"
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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=
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -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) {
|
||||
|
||||
+1
-1
@@ -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
|
||||
}
|
||||
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user