Skip to content

Commit

Permalink
enhance: move segcore codes of segment into one package
Browse files Browse the repository at this point in the history
- move most cgo opeartion related to search/query into segcore package
  for reusing for streamingnode.
- add go unittest for segcore operations.

Signed-off-by: chyezh <[email protected]>
  • Loading branch information
chyezh committed Nov 22, 2024
1 parent 8187fb7 commit 7e3e8be
Show file tree
Hide file tree
Showing 54 changed files with 2,391 additions and 857 deletions.
1 change: 0 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -473,7 +473,6 @@ generate-mockery-querycoord: getdeps

generate-mockery-querynode: getdeps build-cpp
@source $(PWD)/scripts/setenv.sh # setup PKG_CONFIG_PATH
$(INSTALL_PATH)/mockery --name=QueryHook --dir=$(PWD)/internal/querynodev2/optimizers --output=$(PWD)/internal/querynodev2/optimizers --filename=mock_query_hook.go --with-expecter --outpkg=optimizers --structname=MockQueryHook --inpackage
$(INSTALL_PATH)/mockery --name=Manager --dir=$(PWD)/internal/querynodev2/cluster --output=$(PWD)/internal/querynodev2/cluster --filename=mock_manager.go --with-expecter --outpkg=cluster --structname=MockManager --inpackage
$(INSTALL_PATH)/mockery --name=SegmentManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_segment_manager.go --with-expecter --outpkg=segments --structname=MockSegmentManager --inpackage
$(INSTALL_PATH)/mockery --name=CollectionManager --dir=$(PWD)/internal/querynodev2/segments --output=$(PWD)/internal/querynodev2/segments --filename=mock_collection_manager.go --with-expecter --outpkg=segments --structname=MockCollectionManager --inpackage
Expand Down
6 changes: 6 additions & 0 deletions internal/.mockery.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,9 @@ packages:
interfaces:
StreamingCoordCataLog:
StreamingNodeCataLog:
github.com/milvus-io/milvus/internal/util/segcore:
interfaces:
CSegment:
github.com/milvus-io/milvus/internal/util/streamingutil/service/discoverer:
interfaces:
Discoverer:
Expand All @@ -72,6 +75,9 @@ packages:
interfaces:
Resolver:
Builder:
github.com/milvus-io/milvus/internal/util/searchutil/optimizers:
interfaces:
QueryHook:
google.golang.org/grpc/resolver:
interfaces:
ClientConn:
Expand Down
3 changes: 3 additions & 0 deletions internal/core/src/segcore/segcore_init_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@

#pragma once

#include <stdbool.h>
#include <stdint.h>

#ifdef __cplusplus
extern "C" {
#endif
Expand Down
Loading

0 comments on commit 7e3e8be

Please sign in to comment.