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.
Go blob-storagecloud-drivedistributed-file-systemdistributed-storageerasure-codingfusehadoop-hdfshdfskuberneteslancelancedbobject-storageposixs3s3-storageseaweedfstiered-file-systemvector-search
rename
chrisludd1ec70e6294
diff --git a/weed/mq/pub_balancer/allocate.go b/weed/mq/pub_balancer/allocate.goindex cf94fec5b8..8fa0214ad7 100644--- a/weed/mq/pub_balancer/allocate.go+++ b/weed/mq/pub_balancer/allocate.go@@ -8,7 +8,7 @@ import ("time")-func allocateTopicPartitions(brokers cmap.ConcurrentMap[string, *BrokerStats], partitionCount int32) (assignments []*mq_pb.BrokerPartitionAssignment) {+func AllocateTopicPartitions(brokers cmap.ConcurrentMap[string, *BrokerStats], partitionCount int32) (assignments []*mq_pb.BrokerPartitionAssignment) {// divide the ring into partitionsnow := time.Now().UnixNano()rangeSize := MaxPartitionCount / partitionCountdiff --git a/weed/mq/pub_balancer/allocate_test.go b/weed/mq/pub_balancer/allocate_test.goindex a9056cdb98..3a1598fa06 100644--- a/weed/mq/pub_balancer/allocate_test.go+++ b/weed/mq/pub_balancer/allocate_test.go@@ -53,7 +53,7 @@ func testThem(t *testing.T, tests []struct {}) {for _, tt := range tests {t.Run(tt.name, func(t *testing.T) {- gotAssignments := allocateTopicPartitions(tt.args.brokers, tt.args.partitionCount)+ gotAssignments := AllocateTopicPartitions(tt.args.brokers, tt.args.partitionCount)assert.Equal(t, len(tt.wantAssignments), len(gotAssignments))for i, gotAssignment := range gotAssignments {assert.Equal(t, tt.wantAssignments[i].LeaderBroker, gotAssignment.LeaderBroker)