Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

filer: default cassandra2 timeout and ydb prefix so env-var configs match the scaffold (#10234)

Chris Lu39ff5ae767bb
diff --git a/weed/filer/cassandra2/cassandra_store.go b/weed/filer/cassandra2/cassandra_store.go
index 20f068f5c2..5b099eb056 100644
--- a/weed/filer/cassandra2/cassandra_store.go
+++ b/weed/filer/cassandra2/cassandra_store.go
@@ -31,6 +31,8 @@ func (store *Cassandra2Store) GetName() string {
}
func (store *Cassandra2Store) Initialize(configuration util.Configuration, prefix string) (err error) {
+ // Without this, an env-var config that omits the key drops cluster.Timeout to 0.
+ configuration.SetDefault(prefix+"connection_timeout_millisecond", 600)
enableHostVerification := true
if val := configuration.GetString(prefix + "ssl_enable_host_verification"); val != "" {
enableHostVerification = configuration.GetBool(prefix + "ssl_enable_host_verification")
diff --git a/weed/filer/ydb/ydb_store.go b/weed/filer/ydb/ydb_store.go
index 66a38cc0f9..a5e1850b76 100644
--- a/weed/filer/ydb/ydb_store.go
+++ b/weed/filer/ydb/ydb_store.go
@@ -33,6 +33,7 @@ const (
defaultMinPartitionsCount = 5
defaultMaxPartitionsCount = 1000
defaultMaxListChunk = 2000
+ defaultTablePathPrefix = "seaweedfs"
)
var (
@@ -64,6 +65,7 @@ func (store *YdbStore) GetName() string {
}
func (store *YdbStore) Initialize(configuration util.Configuration, prefix string) (err error) {
+ configuration.SetDefault(prefix+"prefix", defaultTablePathPrefix)
configuration.SetDefault(prefix+"partitionBySizeEnabled", defaultPartitionBySizeEnabled)
configuration.SetDefault(prefix+"partitionSizeMb", defaultPartitionSizeMb)
configuration.SetDefault(prefix+"partitionByLoadEnabled", defaultPartitionByLoadEnabled)