You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: pkg/segmentwriter/service.go
+52-13Lines changed: 52 additions & 13 deletions
Original file line number
Diff line number
Diff line change
@@ -41,19 +41,21 @@ const (
41
41
)
42
42
43
43
typeConfigstruct {
44
-
GRPCClientConfig grpcclient.Config`yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the segment writer."`
GRPCClientConfig grpcclient.Config`yaml:"grpc_client_config" doc:"description=Configures the gRPC client used to communicate with the segment writer."`
f.UintVar(&cfg.UploadHedgeRateBurst, prefix+".upload-hedge-rate-burst", defaultHedgedRequestBurst, "Maximum number of hedged requests in a burst.")
80
82
f.BoolVar(&cfg.MetadataDLQEnabled, prefix+".metadata-dlq-enabled", true, "Enables dead letter queue (DLQ) for metadata. If the metadata update fails, it will be stored and updated asynchronously.")
81
83
f.DurationVar(&cfg.MetadataUpdateTimeout, prefix+".metadata-update-timeout", 2*time.Second, "Timeout for metadata update requests.")
84
+
f.BoolVar(&cfg.BucketHealthCheckEnabled, prefix+".bucket-health-check-enabled", true, "Enables bucket health check on startup. This both validates credentials and warms up the connection to reduce latency for the first write.")
85
+
f.DurationVar(&cfg.BucketHealthCheckTimeout, prefix+".bucket-health-check-timeout", 10*time.Second, "Timeout for bucket health check operations.")
82
86
}
83
87
84
88
typeLimitsinterface {
@@ -155,7 +159,42 @@ func New(
155
159
returni, nil
156
160
}
157
161
162
+
// performBucketHealthCheck performs a lightweight bucket operation to warm up the connection
163
+
// and detect any object storage issues early. This serves the dual purpose of validating
164
+
// bucket accessibility and reducing latency for the first actual write operation.
0 commit comments