Skip to content

Commit

Permalink
Update Knowhere version (#27445)
Browse files Browse the repository at this point in the history
Signed-off-by: Li Liu <[email protected]>
Co-authored-by: Li Liu <[email protected]>
  • Loading branch information
czs007 and liliu-z authored Sep 29, 2023
1 parent 2b64cfc commit dbdb9e1
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 6 deletions.
2 changes: 1 addition & 1 deletion internal/core/thirdparty/knowhere/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# or implied. See the License for the specific language governing permissions and limitations under the License.
#-------------------------------------------------------------------------------

set( KNOWHERE_VERSION 87190cf )
set( KNOWHERE_VERSION 6225493 )
set( GIT_REPOSITORY "https://github.com/zilliztech/knowhere.git")
if ( INDEX_ENGINE STREQUAL "cardinal" )
set( KNOWHERE_VERSION 87190cf )
Expand Down
12 changes: 7 additions & 5 deletions internal/querynodev2/segments/mock_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -944,13 +944,15 @@ func GenAndSaveIndex(collectionID, partitionID, segmentID, fieldID int64, msgLen
return nil, err
}
}
_, cCurrentIndexVersion := getIndexEngineVersion()

return &querypb.FieldIndexInfo{
FieldID: fieldID,
EnableIndex: true,
IndexName: "querynode-test",
IndexParams: funcutil.Map2KeyValuePair(indexParams),
IndexFilePaths: indexPaths,
FieldID: fieldID,
EnableIndex: true,
IndexName: "querynode-test",
IndexParams: funcutil.Map2KeyValuePair(indexParams),
IndexFilePaths: indexPaths,
CurrentIndexVersion: cCurrentIndexVersion,
}, nil
}

Expand Down
16 changes: 16 additions & 0 deletions internal/querynodev2/segments/segment_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,17 @@

package segments

/*
#cgo pkg-config: milvus_segcore milvus_common
#include "segcore/collection_c.h"
#include "segcore/segment_c.h"
#include "segcore/segcore_init_c.h"
#include "common/init_c.h"
*/
import "C"

import (
"context"
"fmt"
Expand Down Expand Up @@ -1097,3 +1108,8 @@ func getBinlogDataSize(fieldBinlog *datapb.FieldBinlog) int64 {

return fieldSize
}

func getIndexEngineVersion() (minimal, current int32) {
cMinimal, cCurrent := C.GetMinimalIndexVersion(), C.GetCurrentIndexVersion()
return int32(cMinimal), int32(cCurrent)
}

0 comments on commit dbdb9e1

Please sign in to comment.