Skip to content

Commit 6d2ad51

Browse files
authored
enhance:[StorageV2] Adapt local storage & other minor issue (milvus-io#42167)
Related to milvus-io#39173 This PR - Handle storage v2 log path in local storage mode on querynode - Ignore field info check when append index for loaded sealed segment when using storage v2 Signed-off-by: Congqi Xia <[email protected]>
1 parent 729d0b6 commit 6d2ad51

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

internal/querynodev2/segments/segment_loader.go

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ type segmentLoader struct {
230230
var _ Loader = (*segmentLoader)(nil)
231231

232232
func addBucketNameStorageV2(segmentInfo *querypb.SegmentLoadInfo) {
233-
if segmentInfo.GetStorageVersion() == 2 {
233+
if segmentInfo.GetStorageVersion() == 2 && paramtable.Get().CommonCfg.StorageType.GetValue() != "local" {
234234
bucketName := paramtable.Get().ServiceParam.MinioCfg.BucketName.GetValue()
235235
for _, fieldBinlog := range segmentInfo.GetBinlogPaths() {
236236
for _, binlog := range fieldBinlog.GetBinlogs() {
@@ -1712,9 +1712,12 @@ func (loader *segmentLoader) LoadIndex(ctx context.Context,
17121712
return merr.WrapErrIndexNotFound("index file list empty")
17131713
}
17141714

1715-
fieldInfo, ok := fieldInfos[info.GetFieldID()]
1716-
if !ok {
1717-
return merr.WrapErrParameterInvalid("index info with corresponding field info", "missing field info", strconv.FormatInt(fieldInfo.GetFieldID(), 10))
1715+
// TODO add field info sync between segcore and go segment for storage v2
1716+
if loadInfo.GetStorageVersion() != 2 {
1717+
fieldInfo, ok := fieldInfos[info.GetFieldID()]
1718+
if !ok {
1719+
return merr.WrapErrParameterInvalid("index info with corresponding field info", "missing field info", strconv.FormatInt(fieldInfo.GetFieldID(), 10))
1720+
}
17181721
}
17191722
err := loader.loadFieldIndex(ctx, segment, info)
17201723
if err != nil {

0 commit comments

Comments
 (0)