fix: Using bucket name in storage config for bulk writer v2 (#44083)

issue: #44082

---------

Signed-off-by: Cai Zhang <cai.zhang@zilliz.com>
This commit is contained in:
cai.zhang 2025-08-27 23:47:51 +08:00 committed by GitHub
parent e3b3502287
commit eddf188452
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -115,6 +115,13 @@ func (bw *BulkPackWriterV2) getRootPath() string {
return bw.chunkManager.RootPath()
}
func (bw *BulkPackWriterV2) getBucketName() string {
if bw.storageConfig != nil {
return bw.storageConfig.BucketName
}
return paramtable.Get().ServiceParam.MinioCfg.BucketName.GetValue()
}
func (bw *BulkPackWriterV2) writeInserts(ctx context.Context, pack *SyncPack) (map[int64]*datapb.FieldBinlog, error) {
if len(pack.insertData) == 0 {
return make(map[int64]*datapb.FieldBinlog), nil
@ -147,7 +154,7 @@ func (bw *BulkPackWriterV2) writeInserts(ctx context.Context, pack *SyncPack) (m
}
}
bucketName := paramtable.Get().ServiceParam.MinioCfg.BucketName.GetValue()
bucketName := bw.getBucketName()
var pluginContextPtr *indexcgopb.StoragePluginContext
if hookutil.IsClusterEncyptionEnabled() {