mirror of https://github.com/milvus-io/milvus.git
Fix issue about collection cannot be found
Signed-off-by: bigsheeper <yihao.dai@zilliz.com>pull/4973/head^2
parent
a0729f9202
commit
707a6a366e
|
@ -19,6 +19,9 @@ NewCollection(const char* collection_proto) {
|
|||
|
||||
auto collection = std::make_unique<milvus::segcore::Collection>(proto);
|
||||
|
||||
// TODO: delete print
|
||||
std::cout << "create collection " << collection->get_collection_name() << std::endl;
|
||||
|
||||
return (void*)collection.release();
|
||||
}
|
||||
|
||||
|
|
|
@ -12,6 +12,7 @@ package querynode
|
|||
*/
|
||||
import "C"
|
||||
import (
|
||||
"fmt"
|
||||
"github.com/zilliztech/milvus-distributed/internal/proto/internalpb"
|
||||
"log"
|
||||
"strconv"
|
||||
|
@ -229,6 +230,7 @@ func (colReplica *collectionReplicaImpl) addPartitionsByCollectionMeta(colMeta *
|
|||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
fmt.Println("add partition: ", tag)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
@ -262,6 +264,7 @@ func (colReplica *collectionReplicaImpl) removePartitionsByCollectionMeta(colMet
|
|||
if err != nil {
|
||||
log.Println(err)
|
||||
}
|
||||
fmt.Println("delete partition: ", tag)
|
||||
}
|
||||
|
||||
return nil
|
||||
|
|
|
@ -145,7 +145,7 @@ func printSegmentStruct(obj *etcdpb.SegmentMeta) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processCollectionCreate(id string, value string) {
|
||||
println(fmt.Sprintf("Create Collection:$%s$", id))
|
||||
//println(fmt.Sprintf("Create Collection:$%s$", id))
|
||||
|
||||
col := mService.collectionUnmarshal(value)
|
||||
if col != nil {
|
||||
|
@ -163,7 +163,7 @@ func (mService *metaService) processCollectionCreate(id string, value string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processSegmentCreate(id string, value string) {
|
||||
println("Create Segment: ", id)
|
||||
//println("Create Segment: ", id)
|
||||
|
||||
seg := mService.segmentUnmarshal(value)
|
||||
if !isSegmentChannelRangeInQueryNodeChannelRange(seg) {
|
||||
|
@ -182,7 +182,7 @@ func (mService *metaService) processSegmentCreate(id string, value string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processCreate(key string, msg string) {
|
||||
println("process create", key)
|
||||
//println("process create", key)
|
||||
if isCollectionObj(key) {
|
||||
objID := GetCollectionObjID(key)
|
||||
mService.processCollectionCreate(objID, msg)
|
||||
|
@ -214,7 +214,7 @@ func (mService *metaService) processSegmentModify(id string, value string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processCollectionModify(id string, value string) {
|
||||
println("Modify Collection: ", id)
|
||||
//println("Modify Collection: ", id)
|
||||
|
||||
col := mService.collectionUnmarshal(value)
|
||||
if col != nil {
|
||||
|
@ -242,7 +242,7 @@ func (mService *metaService) processModify(key string, msg string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processSegmentDelete(id string) {
|
||||
println("Delete segment: ", id)
|
||||
//println("Delete segment: ", id)
|
||||
|
||||
var segmentID, err = strconv.ParseInt(id, 10, 64)
|
||||
if err != nil {
|
||||
|
@ -257,7 +257,7 @@ func (mService *metaService) processSegmentDelete(id string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processCollectionDelete(id string) {
|
||||
println("Delete collection: ", id)
|
||||
//println("Delete collection: ", id)
|
||||
|
||||
var collectionID, err = strconv.ParseInt(id, 10, 64)
|
||||
if err != nil {
|
||||
|
@ -272,7 +272,7 @@ func (mService *metaService) processCollectionDelete(id string) {
|
|||
}
|
||||
|
||||
func (mService *metaService) processDelete(key string) {
|
||||
println("process delete")
|
||||
//println("process delete")
|
||||
|
||||
if isCollectionObj(key) {
|
||||
objID := GetCollectionObjID(key)
|
||||
|
|
|
@ -146,7 +146,6 @@ class TestSearchBase:
|
|||
yield request.param
|
||||
|
||||
# PASS
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_search_flat(self, connect, collection, get_top_k, get_nq):
|
||||
'''
|
||||
target: test basic search function, all the search params is corrent, change top-k value
|
||||
|
@ -599,7 +598,6 @@ class TestSearchBase:
|
|||
res = connect.search(collection_name, default_query)
|
||||
|
||||
# PASS
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_search_distance_l2(self, connect, collection):
|
||||
'''
|
||||
target: search collection, and check the result: distance
|
||||
|
@ -850,7 +848,6 @@ class TestSearchBase:
|
|||
# PASS
|
||||
@pytest.mark.level(2)
|
||||
@pytest.mark.timeout(30)
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_search_concurrent_multithreads(self, connect, args):
|
||||
'''
|
||||
target: test concurrent search with multiprocessess
|
||||
|
@ -886,7 +883,6 @@ class TestSearchBase:
|
|||
# PASS
|
||||
@pytest.mark.level(2)
|
||||
@pytest.mark.timeout(30)
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_search_concurrent_multithreads_single_connection(self, connect, args):
|
||||
'''
|
||||
target: test concurrent search with multiprocessess
|
||||
|
@ -920,7 +916,6 @@ class TestSearchBase:
|
|||
|
||||
# PASS
|
||||
@pytest.mark.level(2)
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_search_multi_collections(self, connect, args):
|
||||
'''
|
||||
target: test search multi collections of L2
|
||||
|
@ -1011,7 +1006,6 @@ class TestSearchDSL(object):
|
|||
res = connect.search(collection, query)
|
||||
|
||||
# PASS
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_query_vector_only(self, connect, collection):
|
||||
entities, ids = init_data(connect, collection)
|
||||
res = connect.search(collection, default_query)
|
||||
|
@ -1318,7 +1312,6 @@ class TestSearchDSL(object):
|
|||
|
||||
# PASS
|
||||
@pytest.mark.level(2)
|
||||
@pytest.mark.skip("should pass")
|
||||
def test_query_range_invalid_ranges(self, connect, collection):
|
||||
'''
|
||||
method: build query with invalid ranges
|
||||
|
|
Loading…
Reference in New Issue