Skip to content

Commit

Permalink
Fix an issue where query coord calls MinioChunkManager during init (m…
Browse files Browse the repository at this point in the history
…ilvus-io#16629)

It causes Milvus not runnable with local storage.

issue: milvus-io#15604

/kind enhancement

Signed-off-by: Yuchen Gao <yuchen.gao@zilliz.com>
  • Loading branch information
soothing-rain committed May 12, 2022
1 parent 6c5c514 commit 4b4efbe
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
2 changes: 2 additions & 0 deletions internal/storage/minio_chunk_manager.go
Expand Up @@ -45,6 +45,7 @@ type MinioChunkManager struct {
var _ ChunkManager = (*MinioChunkManager)(nil)

// NewMinioChunkManager create a new local manager object.
// Deprecated: Do not call this directly! Use factory.NewVectorStorageChunkManager instead.
func NewMinioChunkManager(ctx context.Context, opts ...Option) (*MinioChunkManager, error) {
c := newDefaultConfig()
for _, opt := range opts {
Expand All @@ -53,6 +54,7 @@ func NewMinioChunkManager(ctx context.Context, opts ...Option) (*MinioChunkManag

return newMinioChunkManagerWithConfig(ctx, c)
}

func newMinioChunkManagerWithConfig(ctx context.Context, c *config) (*MinioChunkManager, error) {
minIOClient, err := minio.New(c.address, &minio.Options{
Creds: credentials.NewStaticV4(c.accessKeyID, c.secretAccessKeyID, ""),
Expand Down
1 change: 1 addition & 0 deletions internal/storage/minio_chunk_manager_test.go
Expand Up @@ -26,6 +26,7 @@ import (
"github.com/stretchr/testify/require"
)

// TODO: NewMinioChunkManager is deprecated. Rewrite this unittest.
func newMinIOChunkManager(ctx context.Context, bucketName string) (*MinioChunkManager, error) {
endPoint, _ := Params.Load("_MinioAddress")
accessKeyID, _ := Params.Load("minio.accessKeyID")
Expand Down

0 comments on commit 4b4efbe

Please sign in to comment.