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.

wait for each publish clients

chrislua297247137b2
diff --git a/weed/mq/client/pub_client/publisher.go b/weed/mq/client/pub_client/publisher.go
index 2bf8663952..c952bcfb6d 100644
--- a/weed/mq/client/pub_client/publisher.go
+++ b/weed/mq/client/pub_client/publisher.go
@@ -10,7 +10,6 @@ import (
"google.golang.org/grpc/credentials/insecure"
"log"
"sync"
- "time"
)
type PublisherConfiguration struct {
@@ -63,7 +62,10 @@ func (p *TopicPublisher) Shutdown() error {
inputBuffer.CloseInput()
}
}
- time.Sleep(1100 * time.Millisecond)
+
+ for _, job := range p.jobs {
+ job.wg.Wait()
+ }
return nil
}