Replace pdf figs with png figs

Signed-off-by: GuoRentong <rentong.guo@zilliz.com>
pull/4973/head^2
GuoRentong 2020-10-31 15:11:47 +08:00 committed by yefu.chen
parent 27b9a51938
commit 15b6963be0
66 changed files with 687 additions and 584 deletions

7
.gitignore vendored
View File

@ -36,9 +36,10 @@ sdk/cmake-build-release
sdk/cmake_build_release
# Compiled source
reader
master
proxy
cmd/reader/reader
cmd/master/main
cmd/proxy/proxy
cmd/benchmark/benckmark
*.a
*.so
*.so.*

View File

@ -30,7 +30,7 @@ Transaction is currently not supported by Milvus. Only batch requests such as ba
<img src="./figs/data_organization.pdf" width=550>
<img src="./figs/data_organization.png" width=550>
In Milvus, 'collection' refers to the concept of table. A collection can be optionally divided into several 'partitions'. Both collection and partition are the basic execution scopes of queries. When use parition, users should clearly know how a collection should be partitioned. In most cases, parition leads to more flexible data management and more efficient quering. For a partitioned collection, queries can be executed both on the collection or a set of specified partitions.
@ -44,7 +44,7 @@ Each collection or parition contains a set of 'segment groups'. Segment group is
<img src="./figs/system_framework.pdf" width=800>
<img src="./figs/system_framework.png" width=800>
The main components, proxy, WAL, query node and write node can scale to multiple instances. These components scale seperately for better tradeoff between availability and cost.
@ -62,7 +62,7 @@ Note that not all the components are necessarily replicated. The system provides
#### 1.4 State Synchronization
<img src="./figs/state_sync.pdf" width=800>
<img src="./figs/state_sync.png" width=800>
Data in Milvus have three different forms, namely WAL, binlog, and index. As mentioned in the previous section, WAL can be viewed as a determined operation stream. Other two data forms keep themselves up to date by performing the operation stream in time order.
@ -170,7 +170,7 @@ In this section, we introduce the RPCs of milvus service. A brief description of
Before we discuss timestamp, let's take a brief review of Hybrid Logical Clock (HLC). HLC uses 64bits timestamps which are composed of a 46-bits physical component (thought of as and always close to local wall time) and a 18-bits logical component (used to distinguish between events with the same physical component).
<img src="./figs/hlc.pdf" width=450>
<img src="./figs/hlc.png" width=400>
HLC's logical part is advanced on each request. The phsical part can be increased in two cases:
@ -335,7 +335,8 @@ const {
type TsMsg interface {
SetTs(ts Timestamp)
Ts() Timestamp
BeginTs() Timestamp
EndTs() Timestamp
Type() MsgType
}
@ -356,11 +357,11 @@ type MsgStream interface {
Consume() *MsgPack // message can be consumed exactly once
}
type HashFunc func(*MsgPack) map[int32]*MsgPack
type RepackFunc(msgs []* TsMsg, hashKeys [][]int32) map[int32] *MsgPack
type PulsarMsgStream struct {
client *pulsar.Client
msgHashFunc HashFunc // return a map from produceChannel idx to *MsgPack
repackFunc RepackFunc
producers []*pulsar.Producer
consumers []*pulsar.Consumer
msgMarshaler *TsMsgMarshaler
@ -370,7 +371,7 @@ type PulsarMsgStream struct {
func (ms *PulsarMsgStream) SetProducerChannels(channels []string)
func (ms *PulsarMsgStream) SetConsumerChannels(channels []string)
func (ms *PulsarMsgStream) SetMsgMarshaler(marshal *TsMsgMarshaler, unmarshal *TsMsgMarshaler)
func (ms *PulsarMsgStream) SetMsgHashFunc(hashFunc *HashFunc)
func (ms *PulsarMsgStream) SetRepackFunc(repackFunc RepackFunc)
func (ms *PulsarMsgStream) Produce(msgs *MsgPack) error
func (ms *PulsarMsgStream) Consume() (*MsgPack, error) //return messages in one time tick

Binary file not shown.

After

Width:  |  Height:  |  Size: 294 KiB

Binary file not shown.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 10 KiB

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 587 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 318 KiB

View File

@ -203,10 +203,10 @@ endif ()
set( GPU_ENABLE "false" )
install(
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/dog_segment/
DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR}/src/segcore/
DESTINATION include
FILES_MATCHING PATTERN "*_c.h"
)
install(FILES ${CMAKE_BINARY_DIR}/src/dog_segment/libmilvus_dog_segment.so
install(FILES ${CMAKE_BINARY_DIR}/src/segcore/libmilvus_segcore.so
DESTINATION lib)

View File

@ -7,7 +7,7 @@ fi
CorePath=$1
formatThis() {
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "/thirdparty" | grep -v "\.pb\." | xargs clang-format -i
find "$1" | grep -E "(*\.cpp|*\.h|*\.cc)$" | grep -v "/thirdparty" | grep -v "\.pb\." | xargs clang-format-10 -i
}
formatThis "${CorePath}/src"

View File

@ -26,6 +26,6 @@ endforeach ()
add_subdirectory( utils )
add_subdirectory( log )
add_subdirectory( pb )
add_subdirectory( dog_segment )
add_subdirectory( segcore )
add_subdirectory( cache )
add_subdirectory( query )

View File

@ -1,5 +0,0 @@
#include <iostream>
#include "dog_segment/ConcurrentVector.h"
namespace milvus::dog_segment {}

View File

@ -1,2 +0,0 @@
#include <algorithm>
#include <tbb/iterators.h>

View File

@ -9,7 +9,6 @@
// is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
// or implied. See the License for the specific language governing permissions and limitations under the License
#include <algorithm>
#include <memory>
#include <utility>

View File

@ -13,9 +13,9 @@
#include <iostream>
#include <random>
#include "knowhere/common/Config.h"
#include "knowhere/index/vector_index/IndexHNSW.h"
#include "knowhere/index/vector_index/helpers/IndexParameter.h"
#include "knowhere/common/Config.h"
#include "knowhere/index/vector_index/IndexHNSW.h"
#include "knowhere/index/vector_index/helpers/IndexParameter.h"
#include "knowhere/common/Exception.h"
#include "unittest/utils.h"

View File

@ -3,7 +3,7 @@
#include "query/BooleanQuery.h"
#include "query/BinaryQuery.h"
#include "query/GeneralQuery.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/SegmentBase.h"
#include <random>
namespace milvus::wtf {

View File

@ -3,7 +3,7 @@
#include <mutex>
#include <set>
#include <atomic>
namespace milvus::dog_segment {
namespace milvus::segcore {
class AckResponder {
public:
void
@ -12,13 +12,13 @@ class AckResponder {
fetch_and_flip(seg_end);
auto old_begin = fetch_and_flip(seg_begin);
if (old_begin) {
minimal = *acks_.begin();
minimum_ = *acks_.begin();
}
}
int64_t
GetAck() const {
return minimal;
return minimum_;
}
private:
@ -36,6 +36,7 @@ class AckResponder {
private:
std::shared_mutex mutex_;
std::set<int64_t> acks_ = {0};
std::atomic<int64_t> minimal = 0;
std::atomic<int64_t> minimum_ = 0;
// std::atomic<int64_t> maximum_ = 0;
};
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,5 +1,5 @@
set(DOG_SEGMENT_FILES
set(SEGCORE_FILES
SegmentNaive.cpp
SegmentSmallIndex.cpp
IndexMeta.cpp
@ -11,12 +11,14 @@ set(DOG_SEGMENT_FILES
segment_c.cpp
EasyAssert.cpp
SegmentBase.cpp
IndexingEntry.cpp
InsertRecord.cpp
)
add_library(milvus_dog_segment SHARED
${DOG_SEGMENT_FILES}
add_library(milvus_segcore SHARED
${SEGCORE_FILES}
)
target_link_libraries(milvus_dog_segment
target_link_libraries(milvus_segcore
tbb utils pthread knowhere log milvus_proto
dl backtrace
milvus_query

View File

@ -6,7 +6,7 @@
#include <google/protobuf/text_format.h>
#include <knowhere/index/vector_index/adapter/VectorAdapter.h>
namespace milvus::dog_segment {
namespace milvus::segcore {
Collection::Collection(std::string& collection_name, std::string& schema)
: collection_name_(collection_name), schema_json_(schema) {
@ -128,15 +128,15 @@ Collection::parse() {
}
auto schema = std::make_shared<Schema>();
for (const milvus::proto::schema::FieldSchema& child : collection_meta.schema().fields()) {
const auto & type_params = child.type_params();
const auto& type_params = child.type_params();
int dim = 16;
for (const auto & type_param: type_params){
if(type_param.key() == "dim"){
for (const auto& type_param : type_params) {
if (type_param.key() == "dim") {
// dim = type_param.value();
}
}
std::cout << "add Field, name :" << child.name() << ", datatype :" << child.data_type()
<< ", dim :" << dim << std::endl;
std::cout << "add Field, name :" << child.name() << ", datatype :" << child.data_type() << ", dim :" << dim
<< std::endl;
schema->AddField(std::string_view(child.name()), DataType(child.data_type()), dim);
}
/*
@ -146,4 +146,4 @@ Collection::parse() {
schema_ = schema;
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,10 +1,10 @@
#pragma once
#include <pb/message.pb.h>
#include "dog_segment/Partition.h"
#include "segcore/Partition.h"
#include "SegmentDefs.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
class Collection {
public:
@ -44,4 +44,4 @@ class Collection {
using CollectionPtr = std::unique_ptr<Collection>;
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -0,0 +1,5 @@
#include <iostream>
#include "segcore/ConcurrentVector.h"
namespace milvus::segcore {}

View File

@ -8,7 +8,7 @@
#include <shared_mutex>
#include <vector>
#include "EasyAssert.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
// we don't use std::array because capacity of concurrent_vector wastes too much memory
// template <typename Type>
@ -207,4 +207,4 @@ class ConcurrentVector : public VectorBase {
ThreadSafeVector<Chunk> chunks_;
};
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -5,7 +5,7 @@
#include "knowhere//index/vector_index/IndexIVF.h"
#include <memory>
namespace milvus::dog_segment {
namespace milvus::segcore {
struct DeletedRecord {
struct TmpBitmap {
@ -60,4 +60,4 @@ DeletedRecord::TmpBitmap::clone(int64_t capacity) -> std::shared_ptr<TmpBitmap>
return res;
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,7 +1,7 @@
#include "IndexMeta.h"
#include <mutex>
#include <cassert>
namespace milvus::dog_segment {
namespace milvus::segcore {
Status
IndexMeta::AddEntry(
@ -47,4 +47,4 @@ IndexMeta::VerifyEntry(const Entry& entry) {
}
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -3,14 +3,13 @@
//#include <shared_mutex>
//
//#include "SegmentDefs.h"
// #include "dog_segment/SegmentBase.h"
#include "dog_segment/SegmentDefs.h"
// #include "segcore/SegmentBase.h"
#include "segcore/SegmentDefs.h"
#include "knowhere/index/IndexType.h"
#include "knowhere/common/Config.h"
#include <map>
#include <memory>
class IndexMeta;
namespace milvus::dog_segment {
namespace milvus::segcore {
// TODO: this is
class IndexMeta {
public:
@ -62,4 +61,4 @@ class IndexMeta {
};
using IndexMetaPtr = std::shared_ptr<IndexMeta>;
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -0,0 +1,73 @@
#include "IndexingEntry.h"
#include <thread>
#include <knowhere/index/vector_index/IndexIVF.h>
#include <knowhere/index/vector_index/adapter/VectorAdapter.h>
namespace milvus::segcore {
void
IndexingEntry::BuildIndexRange(int64_t ack_beg, int64_t ack_end, const VectorBase* vec_base) {
// TODO
assert(field_meta_.get_data_type() == DataType::VECTOR_FLOAT);
auto dim = field_meta_.get_dim();
auto source = static_cast<const ConcurrentVector<float>*>(vec_base);
auto chunk_size = source->chunk_size();
assert(ack_end <= chunk_size);
auto conf = get_build_conf();
data_.grow_to_at_least(ack_end);
for (int chunk_id = ack_beg; chunk_id < ack_end; chunk_id++) {
const auto& chunk = source->get_chunk(chunk_id);
// build index for chunk
// TODO
auto indexing = std::make_unique<knowhere::IVF>();
auto dataset = knowhere::GenDataset(DefaultElementPerChunk, dim, chunk.data());
indexing->Train(dataset, conf);
indexing->AddWithoutIds(dataset, conf);
data_[chunk_id] = std::move(indexing);
}
}
knowhere::Config
IndexingEntry::get_build_conf() const {
return knowhere::Config{{knowhere::meta::DIM, field_meta_.get_dim()},
{knowhere::IndexParams::nlist, 100},
{knowhere::IndexParams::nprobe, 4},
{knowhere::Metric::TYPE, milvus::knowhere::Metric::L2},
{knowhere::meta::DEVICEID, 0}};
}
knowhere::Config
IndexingEntry::get_search_conf(int top_K) const {
return knowhere::Config{{knowhere::meta::DIM, field_meta_.get_dim()},
{knowhere::meta::TOPK, top_K},
{knowhere::IndexParams::nlist, 100},
{knowhere::IndexParams::nprobe, 4},
{knowhere::Metric::TYPE, milvus::knowhere::Metric::L2},
{knowhere::meta::DEVICEID, 0}};
}
void
IndexingRecord::UpdateResourceAck(int64_t chunk_ack, const InsertRecord& record) {
if (resource_ack_ >= chunk_ack) {
return;
}
std::unique_lock lck(mutex_);
int64_t old_ack = resource_ack_;
if (old_ack >= chunk_ack) {
return;
}
resource_ack_ = chunk_ack;
lck.unlock();
// std::thread([this, old_ack, chunk_ack, &record] {
for (auto& [field_offset, entry] : entries_) {
auto vec_base = record.entity_vec_[field_offset].get();
entry.BuildIndexRange(old_ack, chunk_ack, vec_base);
}
finished_ack_.AddSegment(old_ack, chunk_ack);
// }).detach();
}
} // namespace milvus::segcore

View File

@ -0,0 +1,95 @@
#pragma once
#include "AckResponder.h"
#include <tbb/concurrent_vector.h>
#include "SegmentDefs.h"
#include <optional>
#include "InsertRecord.h"
#include <knowhere/index/vector_index/IndexIVF.h>
namespace milvus::segcore {
// this should be concurrent
// All concurrent
class IndexingEntry {
public:
explicit IndexingEntry(const FieldMeta& field_meta) : field_meta_(field_meta) {
}
// concurrent
knowhere::VecIndex*
get_indexing(int64_t chunk_id) const {
return data_.at(chunk_id).get();
}
// Do this in parallel
void
BuildIndexRange(int64_t ack_beg, int64_t ack_end, const VectorBase* vec_base);
const FieldMeta&
get_field_meta() {
return field_meta_;
}
knowhere::Config
get_build_conf() const;
knowhere::Config
get_search_conf(int top_k) const;
private:
// additional info
const FieldMeta& field_meta_;
private:
tbb::concurrent_vector<std::unique_ptr<knowhere::VecIndex>> data_;
};
class IndexingRecord {
public:
explicit IndexingRecord(const Schema& schema) : schema_(schema) {
Initialize();
}
void
Initialize() {
int offset = 0;
for (auto& field : schema_) {
if (field.is_vector()) {
entries_.try_emplace(offset, field);
}
++offset;
}
assert(offset == schema_.size());
}
// concurrent, reentrant
void
UpdateResourceAck(int64_t chunk_ack, const InsertRecord& record);
// concurrent
int64_t
get_finished_ack() {
return finished_ack_.GetAck();
}
const IndexingEntry&
get_indexing(int i) const {
assert(entries_.count(i));
return entries_.at(i);
}
private:
const Schema& schema_;
private:
// control info
std::atomic<int64_t> resource_ack_ = 0;
// std::atomic<int64_t> finished_ack_ = 0;
AckResponder finished_ack_;
std::mutex mutex_;
private:
// field_offset => indexing
std::map<int, IndexingEntry> entries_;
};
} // namespace milvus::segcore

View File

@ -0,0 +1,16 @@
#include "InsertRecord.h"
namespace milvus::segcore {
InsertRecord::InsertRecord(const Schema& schema) : uids_(1), timestamps_(1) {
for (auto& field : schema) {
if (field.is_vector()) {
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<float>>(field.get_dim()));
} else {
Assert(field.get_data_type() == DataType::INT32);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<int32_t, true>>());
}
}
}
} // namespace milvus::segcore

View File

@ -0,0 +1,22 @@
#pragma once
#include "SegmentDefs.h"
#include "ConcurrentVector.h"
#include "AckResponder.h"
namespace milvus::segcore {
struct InsertRecord {
std::atomic<int64_t> reserved = 0;
AckResponder ack_responder_;
ConcurrentVector<Timestamp, true> timestamps_;
ConcurrentVector<idx_t, true> uids_;
std::vector<std::shared_ptr<VectorBase>> entity_vec_;
InsertRecord(const Schema& schema);
template <typename Type>
auto
get_vec_entity(int offset) {
return std::static_pointer_cast<ConcurrentVector<Type>>(entity_vec_[offset]);
}
};
} // namespace milvus::segcore

View File

@ -1,9 +1,9 @@
#include "Partition.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
Partition::Partition(std::string& partition_name, SchemaPtr& schema, IndexMetaPtr& index)
: partition_name_(partition_name), schema_(schema), index_(index) {
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -2,7 +2,7 @@
#include "SegmentBase.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
class Partition {
public:
@ -32,4 +32,4 @@ class Partition {
using PartitionPtr = std::unique_ptr<Partition>;
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,14 +1,14 @@
#include "SegmentNaive.h"
#include "SegmentSmallIndex.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
// seems to be deprecated
struct ColumnBasedDataChunk {
std::vector<std::vector<float>> entity_vecs;
static ColumnBasedDataChunk
from(const DogDataChunk& source, const Schema& schema) {
from(const RowBasedRawData& source, const Schema& schema) {
ColumnBasedDataChunk dest;
auto count = source.count;
auto raw_data = reinterpret_cast<const char*>(source.raw_data);
@ -38,4 +38,4 @@ CreateSegment(SchemaPtr schema) {
auto segment = std::make_unique<SegmentSmallIndex>(schema);
return segment;
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -3,19 +3,17 @@
#include "IndexMeta.h"
#include "utils/Types.h"
#include "dog_segment/SegmentDefs.h"
#include "segcore/SegmentDefs.h"
// #include "knowhere/index/Index.h"
// #include "knowhere/index/IndexType.h"
#include "query/GeneralQuery.h"
namespace milvus {
namespace dog_segment {
namespace segcore {
// using engine::DataChunk;
// using engine::DataChunkPtr;
using engine::QueryResult;
// using DogDataChunkPtr = std::shared_ptr<DataChunk>;
int
TestABI();
@ -38,16 +36,16 @@ class SegmentBase {
virtual Status
Insert(int64_t reserved_offset,
int64_t size,
const int64_t* primary_keys,
const int64_t* row_ids,
const Timestamp* timestamps,
const DogDataChunk& values) = 0;
const RowBasedRawData& values) = 0;
virtual int64_t
PreDelete(int64_t size) = 0;
// TODO: add id into delete log, possibly bitmap
virtual Status
Delete(int64_t reserved_offset, int64_t size, const int64_t* primary_keys, const Timestamp* timestamps) = 0;
Delete(int64_t reserved_offset, int64_t size, const int64_t* row_ids, const Timestamp* timestamps) = 0;
// query contains metadata of
virtual Status
@ -97,5 +95,5 @@ using SegmentBasePtr = std::unique_ptr<SegmentBase>;
SegmentBasePtr
CreateSegment(SchemaPtr schema);
} // namespace dog_segment
} // namespace segcore
} // namespace milvus

View File

@ -7,15 +7,14 @@
#include "utils/Types.h"
// #include "knowhere/index/Index.h"
#include "utils/Status.h"
#include "dog_segment/IndexMeta.h"
#include "EasyAssert.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
using Timestamp = uint64_t; // TODO: use TiKV-like timestamp
using engine::DataType;
using engine::FieldElementType;
struct DogDataChunk {
struct RowBasedRawData {
void* raw_data; // schema
int sizeof_per_row; // alignment
int64_t count;
@ -193,4 +192,4 @@ class Schema {
using SchemaPtr = std::shared_ptr<Schema>;
using idx_t = int64_t;
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,4 +1,4 @@
#include <dog_segment/SegmentNaive.h>
#include <segcore/SegmentNaive.h>
#include <random>
#include <algorithm>
#include <numeric>
@ -9,18 +9,7 @@
#include <knowhere/index/vector_index/VecIndexFactory.h>
#include <faiss/utils/distances.h>
namespace milvus::dog_segment {
SegmentNaive::Record::Record(const Schema& schema) : uids_(1), timestamps_(1) {
for (auto& field : schema) {
if (field.is_vector()) {
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<float>>(field.get_dim()));
} else {
Assert(field.get_data_type() == DataType::INT32);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<int32_t, true>>());
}
}
}
namespace milvus::segcore {
int64_t
SegmentNaive::PreInsert(int64_t size) {
@ -109,7 +98,7 @@ SegmentNaive::Insert(int64_t reserved_begin,
int64_t size,
const int64_t* uids_raw,
const Timestamp* timestamps_raw,
const DogDataChunk& entities_raw) {
const RowBasedRawData& entities_raw) {
Assert(entities_raw.count == size);
if (entities_raw.sizeof_per_row != schema_->get_total_sizeof()) {
std::string msg = "entity length = " + std::to_string(entities_raw.sizeof_per_row) +
@ -181,9 +170,9 @@ SegmentNaive::Insert(int64_t reserved_begin,
// std::lock_guard lck(mutex_);
// Assert(state_ == SegmentState::Open);
// auto ack_id = ack_count_.load();
// record.uids_.grow_by(primary_keys, primary_keys + size);
// record.uids_.grow_by(row_ids, row_ids + size);
// for (int64_t i = 0; i < size; ++i) {
// auto key = primary_keys[i];
// auto key = row_ids[i];
// auto internal_index = i + ack_id;
// internal_indexes_[key] = internal_index;
// }
@ -222,7 +211,7 @@ SegmentNaive::Delete(int64_t reserved_begin, int64_t size, const int64_t* uids_r
deleted_record_.ack_responder_.AddSegment(reserved_begin, reserved_begin + size);
return Status::OK();
// for (int i = 0; i < size; ++i) {
// auto key = primary_keys[i];
// auto key = row_ids[i];
// auto time = timestamps[i];
// delete_logs_.insert(std::make_pair(key, time));
// }
@ -292,7 +281,6 @@ SegmentNaive::QueryImpl(query::QueryPtr query_info, Timestamp timestamp, QueryRe
result.result_ids_.resize(total_num);
result.result_distances_.resize(total_num);
result.row_num_ = total_num;
result.num_queries_ = num_queries;
result.topK_ = topK;
@ -396,7 +384,6 @@ SegmentNaive::QueryBruteForceImpl(query::QueryPtr query_info, Timestamp timestam
results.result_distances_ = std::move(final_dis);
results.topK_ = topK;
results.num_queries_ = num_queries;
results.row_num_ = total_count;
// throw std::runtime_error("unimplemented");
return Status::OK();
@ -452,7 +439,6 @@ SegmentNaive::QuerySlowImpl(query::QueryPtr query_info, Timestamp timestamp, Que
result.num_queries_ = num_queries;
result.topK_ = topK;
auto row_num = topK * num_queries;
result.row_num_ = topK * num_queries;
result.result_ids_.resize(row_num);
result.result_distances_.resize(row_num);
@ -613,4 +599,4 @@ SegmentNaive::GetMemoryUsageInBytes() {
return total_bytes;
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -9,14 +9,15 @@
#include "AckResponder.h"
#include "ConcurrentVector.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/SegmentBase.h"
// #include "knowhere/index/structured_index/StructuredIndex.h"
#include "query/GeneralQuery.h"
#include "utils/Status.h"
#include "dog_segment/DeletedRecord.h"
#include "segcore/DeletedRecord.h"
#include "EasyAssert.h"
#include "InsertRecord.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
class SegmentNaive : public SegmentBase {
public:
virtual ~SegmentNaive() = default;
@ -31,16 +32,16 @@ class SegmentNaive : public SegmentBase {
Status
Insert(int64_t reserverd_offset,
int64_t size,
const int64_t* primary_keys,
const int64_t* row_ids,
const Timestamp* timestamps,
const DogDataChunk& values) override;
const RowBasedRawData& values) override;
int64_t
PreDelete(int64_t size) override;
// TODO: add id into delete log, possibly bitmap
Status
Delete(int64_t reserverd_offset, int64_t size, const int64_t* primary_keys, const Timestamp* timestamps) override;
Delete(int64_t reserverd_offset, int64_t size, const int64_t* row_ids, const Timestamp* timestamps) override;
// query contains metadata of
Status
@ -100,31 +101,6 @@ class SegmentNaive : public SegmentBase {
}
private:
// struct MutableRecord {
// ConcurrentVector<uint64_t> uids_;
// tbb::concurrent_vector<Timestamp> timestamps_;
// std::vector<tbb::concurrent_vector<float>> entity_vecs_;
//
// MutableRecord(int entity_size) : entity_vecs_(entity_size) {
// }
// };
struct Record {
std::atomic<int64_t> reserved = 0;
AckResponder ack_responder_;
ConcurrentVector<Timestamp, true> timestamps_;
ConcurrentVector<idx_t, true> uids_;
std::vector<std::shared_ptr<VectorBase>> entity_vec_;
Record(const Schema& schema);
template <typename Type>
auto
get_vec_entity(int offset) {
return std::static_pointer_cast<ConcurrentVector<Type>>(entity_vec_[offset]);
}
};
std::shared_ptr<DeletedRecord::TmpBitmap>
get_deleted_bitmap(int64_t del_barrier, Timestamp query_timestamp, int64_t insert_barrier, bool force = false);
@ -144,7 +120,7 @@ class SegmentNaive : public SegmentBase {
private:
SchemaPtr schema_;
std::atomic<SegmentState> state_ = SegmentState::Open;
Record record_;
InsertRecord record_;
DeletedRecord deleted_record_;
std::atomic<bool> index_ready_ = false;
@ -152,4 +128,4 @@ class SegmentNaive : public SegmentBase {
std::unordered_map<std::string, knowhere::IndexPtr> indexings_; // index_name => indexing
tbb::concurrent_unordered_multimap<idx_t, int64_t> uid2offset_;
};
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -1,4 +1,4 @@
#include <dog_segment/SegmentSmallIndex.h>
#include <segcore/SegmentSmallIndex.h>
#include <random>
#include <algorithm>
#include <numeric>
@ -9,19 +9,7 @@
#include <knowhere/index/vector_index/VecIndexFactory.h>
#include <faiss/utils/distances.h>
namespace milvus::dog_segment {
SegmentSmallIndex::Record::Record(const Schema& schema) : uids_(1), timestamps_(1) {
for (auto& field : schema) {
if (field.is_vector()) {
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<float>>(field.get_dim()));
} else {
Assert(field.get_data_type() == DataType::INT32);
entity_vec_.emplace_back(std::make_shared<ConcurrentVector<int32_t, true>>());
}
}
}
namespace milvus::segcore {
int64_t
SegmentSmallIndex::PreInsert(int64_t size) {
@ -112,17 +100,17 @@ SegmentSmallIndex::Insert(int64_t reserved_begin,
int64_t size,
const int64_t* uids_raw,
const Timestamp* timestamps_raw,
const DogDataChunk& entities_raw) {
const RowBasedRawData& entities_raw) {
Assert(entities_raw.count == size);
// step 1: check schema if valid
if (entities_raw.sizeof_per_row != schema_->get_total_sizeof()) {
std::string msg = "entity length = " + std::to_string(entities_raw.sizeof_per_row) +
", schema length = " + std::to_string(schema_->get_total_sizeof());
throw std::runtime_error(msg);
}
// step 2: sort timestamp
auto raw_data = reinterpret_cast<const char*>(entities_raw.raw_data);
// std::vector<char> entities(raw_data, raw_data + size * len_per_row);
auto len_per_row = entities_raw.sizeof_per_row;
std::vector<std::tuple<Timestamp, idx_t, int64_t>> ordering;
ordering.resize(size);
@ -131,6 +119,8 @@ SegmentSmallIndex::Insert(int64_t reserved_begin,
ordering[i] = std::make_tuple(timestamps_raw[i], uids_raw[i], i);
}
std::sort(ordering.begin(), ordering.end());
// step 3: and convert row-base data to column base accordingly
auto sizeof_infos = schema_->get_sizeof_infos();
std::vector<int> offset_infos(schema_->size() + 1, 0);
std::partial_sum(sizeof_infos.begin(), sizeof_infos.end(), offset_infos.begin() + 1);
@ -157,6 +147,7 @@ SegmentSmallIndex::Insert(int64_t reserved_begin,
}
}
// step 4: fill into Segment.ConcurrentVector
record_.timestamps_.set_data(reserved_begin, timestamps.data(), size);
record_.uids_.set_data(reserved_begin, uids.data(), size);
for (int fid = 0; fid < schema_->size(); ++fid) {
@ -170,37 +161,8 @@ SegmentSmallIndex::Insert(int64_t reserved_begin,
}
record_.ack_responder_.AddSegment(reserved_begin, reserved_begin + size);
// indexing_record_.UpdateResourceAck(record_.ack_responder_.GetAck() / DefaultElementPerChunk);
return Status::OK();
// std::thread go(executor, std::move(uids), std::move(timestamps), std::move(entities));
// go.detach();
// const auto& schema = *schema_;
// auto record_ptr = GetMutableRecord();
// Assert(record_ptr);
// auto& record = *record_ptr;
// auto data_chunk = ColumnBasedDataChunk::from(row_values, schema);
//
// // TODO: use shared_lock for better concurrency
// std::lock_guard lck(mutex_);
// Assert(state_ == SegmentState::Open);
// auto ack_id = ack_count_.load();
// record.uids_.grow_by(primary_keys, primary_keys + size);
// for (int64_t i = 0; i < size; ++i) {
// auto key = primary_keys[i];
// auto internal_index = i + ack_id;
// internal_indexes_[key] = internal_index;
// }
// record.timestamps_.grow_by(timestamps, timestamps + size);
// for (int fid = 0; fid < schema.size(); ++fid) {
// auto field = schema[fid];
// auto total_len = field.get_sizeof() * size / sizeof(float);
// auto source_vec = data_chunk.entity_vecs[fid];
// record.entity_vecs_[fid].grow_by(source_vec.data(), source_vec.data() + total_len);
// }
//
// // finish insert
// ack_count_ += size;
// return Status::OK();
}
Status
@ -228,7 +190,7 @@ SegmentSmallIndex::Delete(int64_t reserved_begin,
deleted_record_.ack_responder_.AddSegment(reserved_begin, reserved_begin + size);
return Status::OK();
// for (int i = 0; i < size; ++i) {
// auto key = primary_keys[i];
// auto key = row_ids[i];
// auto time = timestamps[i];
// delete_logs_.insert(std::make_pair(key, time));
// }
@ -252,66 +214,6 @@ get_barrier(const RecordType& record, Timestamp timestamp) {
return beg;
}
Status
SegmentSmallIndex::QueryImpl(query::QueryPtr query_info, Timestamp timestamp, QueryResult& result) {
auto ins_barrier = get_barrier(record_, timestamp);
auto del_barrier = get_barrier(deleted_record_, timestamp);
auto bitmap_holder = get_deleted_bitmap(del_barrier, timestamp, ins_barrier, true);
Assert(bitmap_holder);
Assert(bitmap_holder->bitmap_ptr->count() == ins_barrier);
auto field_offset = schema_->get_offset(query_info->field_name);
auto& field = schema_->operator[](query_info->field_name);
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
auto dim = field.get_dim();
auto bitmap = bitmap_holder->bitmap_ptr;
auto topK = query_info->topK;
auto num_queries = query_info->num_queries;
auto the_offset_opt = schema_->get_offset(query_info->field_name);
Assert(the_offset_opt.has_value());
Assert(the_offset_opt.value() < record_.entity_vec_.size());
auto vec_ptr = std::static_pointer_cast<ConcurrentVector<float>>(record_.entity_vec_.at(the_offset_opt.value()));
auto index_entry = index_meta_->lookup_by_field(query_info->field_name);
auto conf = index_entry.config;
conf[milvus::knowhere::meta::TOPK] = query_info->topK;
{
auto count = 0;
for (int i = 0; i < bitmap->count(); ++i) {
if (bitmap->test(i)) {
++count;
}
}
std::cout << "fuck " << count << std::endl;
}
auto indexing = std::static_pointer_cast<knowhere::VecIndex>(indexings_[index_entry.index_name]);
indexing->SetBlacklist(bitmap);
auto ds = knowhere::GenDataset(query_info->num_queries, dim, query_info->query_raw_data.data());
auto final = indexing->Query(ds, conf, bitmap);
auto ids = final->Get<idx_t*>(knowhere::meta::IDS);
auto distances = final->Get<float*>(knowhere::meta::DISTANCE);
auto total_num = num_queries * topK;
result.result_ids_.resize(total_num);
result.result_distances_.resize(total_num);
result.row_num_ = total_num;
result.num_queries_ = num_queries;
result.topK_ = topK;
std::copy_n(ids, total_num, result.result_ids_.data());
std::copy_n(distances, total_num, result.result_distances_.data());
for (auto& id : result.result_ids_) {
id = record_.uids_[id];
}
return Status::OK();
}
static void
merge_into(int64_t queries,
int64_t topk,
@ -351,30 +253,53 @@ merge_into(int64_t queries,
Status
SegmentSmallIndex::QueryBruteForceImpl(query::QueryPtr query_info, Timestamp timestamp, QueryResult& results) {
// step 1: binary search to find the barrier of the snapshot
auto ins_barrier = get_barrier(record_, timestamp);
auto del_barrier = get_barrier(deleted_record_, timestamp);
#if 0
auto bitmap_holder = get_deleted_bitmap(del_barrier, timestamp, ins_barrier);
Assert(bitmap_holder);
auto bitmap = bitmap_holder->bitmap_ptr;
#endif
// step 2.1: get meta
auto& field = schema_->operator[](query_info->field_name);
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
auto dim = field.get_dim();
auto bitmap = bitmap_holder->bitmap_ptr;
auto topK = query_info->topK;
auto num_queries = query_info->num_queries;
auto total_count = topK * num_queries;
// TODO: optimize
auto the_offset_opt = schema_->get_offset(query_info->field_name);
Assert(the_offset_opt.has_value());
Assert(the_offset_opt.value() < record_.entity_vec_.size());
auto vec_ptr = std::static_pointer_cast<ConcurrentVector<float>>(record_.entity_vec_.at(the_offset_opt.value()));
// step 2.2: get which vector field to search
auto vecfield_offset_opt = schema_->get_offset(query_info->field_name);
Assert(vecfield_offset_opt.has_value());
auto vecfield_offset = vecfield_offset_opt.value();
Assert(vecfield_offset < record_.entity_vec_.size());
auto vec_ptr = std::static_pointer_cast<ConcurrentVector<float>>(record_.entity_vec_.at(vecfield_offset));
std::vector<int64_t> final_uids(total_count);
// step 3: small indexing search
std::vector<int64_t> final_uids(total_count, -1);
std::vector<float> final_dis(total_count, std::numeric_limits<float>::max());
auto max_chunk = (ins_barrier + DefaultElementPerChunk - 1) / DefaultElementPerChunk;
for (int chunk_id = 0; chunk_id < max_chunk; ++chunk_id) {
auto max_indexed_id = indexing_record_.get_finished_ack();
const auto& indexing_entry = indexing_record_.get_indexing(vecfield_offset);
auto search_conf = indexing_entry.get_search_conf(topK);
for (int chunk_id = 0; chunk_id < max_indexed_id; ++chunk_id) {
auto indexing = indexing_entry.get_indexing(chunk_id);
auto src_data = vec_ptr->get_chunk(chunk_id).data();
auto dataset = knowhere::GenDataset(num_queries, dim, src_data);
auto ans = indexing->Query(dataset, search_conf, nullptr);
auto dis = ans->Get<float*>(milvus::knowhere::meta::DISTANCE);
auto uids = ans->Get<int64_t*>(milvus::knowhere::meta::IDS);
merge_into(num_queries, topK, final_dis.data(), final_uids.data(), dis, uids);
}
// step 4: brute force search where small indexing is unavailable
for (int chunk_id = max_indexed_id; chunk_id < max_chunk; ++chunk_id) {
std::vector<int64_t> buf_uids(total_count, -1);
std::vector<float> buf_dis(total_count, std::numeric_limits<float>::max());
@ -383,17 +308,11 @@ SegmentSmallIndex::QueryBruteForceImpl(query::QueryPtr query_info, Timestamp tim
auto src_data = vec_ptr->get_chunk(chunk_id).data();
auto nsize =
chunk_id != max_chunk - 1 ? DefaultElementPerChunk : ins_barrier - chunk_id * DefaultElementPerChunk;
auto offset = chunk_id * DefaultElementPerChunk;
faiss::knn_L2sqr(query_info->query_raw_data.data(), src_data, dim, num_queries, nsize, &buf, bitmap, offset);
if (chunk_id == 0) {
final_uids = buf_uids;
final_dis = buf_dis;
} else {
merge_into(num_queries, topK, final_dis.data(), final_uids.data(), buf_dis.data(), buf_uids.data());
}
faiss::knn_L2sqr(query_info->query_raw_data.data(), src_data, dim, num_queries, nsize, &buf);
merge_into(num_queries, topK, final_dis.data(), final_uids.data(), buf_dis.data(), buf_uids.data());
}
// step 5: convert offset to uids
for (auto& id : final_uids) {
id = record_.uids_[id];
}
@ -402,81 +321,11 @@ SegmentSmallIndex::QueryBruteForceImpl(query::QueryPtr query_info, Timestamp tim
results.result_distances_ = std::move(final_dis);
results.topK_ = topK;
results.num_queries_ = num_queries;
results.row_num_ = total_count;
// throw std::runtime_error("unimplemented");
return Status::OK();
}
Status
SegmentSmallIndex::QuerySlowImpl(query::QueryPtr query_info, Timestamp timestamp, QueryResult& result) {
auto ins_barrier = get_barrier(record_, timestamp);
auto del_barrier = get_barrier(deleted_record_, timestamp);
auto bitmap_holder = get_deleted_bitmap(del_barrier, timestamp, ins_barrier);
Assert(bitmap_holder);
auto& field = schema_->operator[](query_info->field_name);
Assert(field.get_data_type() == DataType::VECTOR_FLOAT);
auto dim = field.get_dim();
auto bitmap = bitmap_holder->bitmap_ptr;
auto topK = query_info->topK;
auto num_queries = query_info->num_queries;
// TODO: optimize
auto the_offset_opt = schema_->get_offset(query_info->field_name);
Assert(the_offset_opt.has_value());
Assert(the_offset_opt.value() < record_.entity_vec_.size());
auto vec_ptr = std::static_pointer_cast<ConcurrentVector<float>>(record_.entity_vec_.at(the_offset_opt.value()));
std::vector<std::priority_queue<std::pair<float, int>>> records(num_queries);
auto get_L2_distance = [dim](const float* a, const float* b) {
float L2_distance = 0;
for (auto i = 0; i < dim; ++i) {
auto d = a[i] - b[i];
L2_distance += d * d;
}
return L2_distance;
};
for (int64_t i = 0; i < ins_barrier; ++i) {
if (i < bitmap->count() && bitmap->test(i)) {
continue;
}
auto element = vec_ptr->get_element(i);
for (auto query_id = 0; query_id < num_queries; ++query_id) {
auto query_blob = query_info->query_raw_data.data() + query_id * dim;
auto dis = get_L2_distance(query_blob, element);
auto& record = records[query_id];
if (record.size() < topK) {
record.emplace(dis, i);
} else if (record.top().first > dis) {
record.emplace(dis, i);
record.pop();
}
}
}
result.num_queries_ = num_queries;
result.topK_ = topK;
auto row_num = topK * num_queries;
result.row_num_ = topK * num_queries;
result.result_ids_.resize(row_num);
result.result_distances_.resize(row_num);
for (int q_id = 0; q_id < num_queries; ++q_id) {
// reverse
for (int i = 0; i < topK; ++i) {
auto dst_id = topK - 1 - i + q_id * topK;
auto [dis, offset] = records[q_id].top();
records[q_id].pop();
result.result_ids_[dst_id] = record_.uids_[offset];
result.result_distances_[dst_id] = dis;
}
}
return Status::OK();
}
Status
SegmentSmallIndex::Query(query::QueryPtr query_info, Timestamp timestamp, QueryResult& result) {
// TODO: enable delete
@ -497,11 +346,8 @@ SegmentSmallIndex::Query(query::QueryPtr query_info, Timestamp timestamp, QueryR
}
}
if (index_ready_) {
return QueryImpl(query_info, timestamp, result);
} else {
return QueryBruteForceImpl(query_info, timestamp, result);
}
// TODO
return QueryBruteForceImpl(query_info, timestamp, result);
}
Status
@ -582,7 +428,9 @@ SegmentSmallIndex::BuildIndex(IndexMetaPtr remote_index_meta) {
if (record_.ack_responder_.GetAck() < 1024 * 4) {
return Status(SERVER_BUILD_INDEX_ERROR, "too few elements");
}
// AssertInfo(false, "unimplemented");
return Status::OK();
#if 0
index_meta_ = remote_index_meta;
for (auto& [index_name, entry] : index_meta_->get_entries()) {
Assert(entry.index_name == index_name);
@ -598,12 +446,14 @@ SegmentSmallIndex::BuildIndex(IndexMetaPtr remote_index_meta) {
}
index_ready_ = true;
#endif
return Status::OK();
}
int64_t
SegmentSmallIndex::GetMemoryUsageInBytes() {
int64_t total_bytes = 0;
#if 0
if (index_ready_) {
auto& index_entries = index_meta_->get_entries();
for (auto [index_name, entry] : index_entries) {
@ -612,6 +462,7 @@ SegmentSmallIndex::GetMemoryUsageInBytes() {
total_bytes += vec_ptr->IndexSize();
}
}
#endif
int64_t ins_n = (record_.reserved + DefaultElementPerChunk - 1) & ~(DefaultElementPerChunk - 1);
total_bytes += ins_n * (schema_->get_total_sizeof() + 16 + 1);
int64_t del_n = (deleted_record_.reserved + DefaultElementPerChunk - 1) & ~(DefaultElementPerChunk - 1);
@ -619,4 +470,4 @@ SegmentSmallIndex::GetMemoryUsageInBytes() {
return total_bytes;
}
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -9,19 +9,21 @@
#include "AckResponder.h"
#include "ConcurrentVector.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/SegmentBase.h"
// #include "knowhere/index/structured_index/StructuredIndex.h"
#include "query/GeneralQuery.h"
#include "utils/Status.h"
#include "dog_segment/DeletedRecord.h"
#include "segcore/DeletedRecord.h"
#include "EasyAssert.h"
#include "IndexingEntry.h"
#include "InsertRecord.h"
namespace milvus::dog_segment {
namespace milvus::segcore {
// struct ColumnBasedDataChunk {
// std::vector<std::vector<float>> entity_vecs;
//
// static ColumnBasedDataChunk
// from(const DogDataChunk& source, const Schema& schema) {
// from(const RowBasedRawData& source, const Schema& schema) {
// ColumnBasedDataChunk dest;
// auto count = source.count;
// auto raw_data = reinterpret_cast<const char*>(source.raw_data);
@ -55,16 +57,16 @@ class SegmentSmallIndex : public SegmentBase {
Status
Insert(int64_t reserverd_offset,
int64_t size,
const int64_t* primary_keys,
const int64_t* row_ids,
const Timestamp* timestamps,
const DogDataChunk& values) override;
const RowBasedRawData& values) override;
int64_t
PreDelete(int64_t size) override;
// TODO: add id into delete log, possibly bitmap
Status
Delete(int64_t reserverd_offset, int64_t size, const int64_t* primary_keys, const Timestamp* timestamps) override;
Delete(int64_t reserverd_offset, int64_t size, const int64_t* row_ids, const Timestamp* timestamps) override;
// query contains metadata of
Status
@ -120,7 +122,7 @@ class SegmentSmallIndex : public SegmentBase {
friend std::unique_ptr<SegmentBase>
CreateSegment(SchemaPtr schema);
explicit SegmentSmallIndex(SchemaPtr schema) : schema_(schema), record_(*schema) {
explicit SegmentSmallIndex(SchemaPtr schema) : schema_(schema), record_(*schema_), indexing_record_(*schema_) {
}
private:
@ -133,31 +135,9 @@ class SegmentSmallIndex : public SegmentBase {
// }
// };
struct Record {
std::atomic<int64_t> reserved = 0;
AckResponder ack_responder_;
ConcurrentVector<Timestamp, true> timestamps_;
ConcurrentVector<idx_t, true> uids_;
std::vector<std::shared_ptr<VectorBase>> entity_vec_;
Record(const Schema& schema);
template <typename Type>
auto
get_vec_entity(int offset) {
return std::static_pointer_cast<ConcurrentVector<Type>>(entity_vec_[offset]);
}
};
std::shared_ptr<DeletedRecord::TmpBitmap>
get_deleted_bitmap(int64_t del_barrier, Timestamp query_timestamp, int64_t insert_barrier, bool force = false);
Status
QueryImpl(query::QueryPtr query, Timestamp timestamp, QueryResult& results);
Status
QuerySlowImpl(query::QueryPtr query, Timestamp timestamp, QueryResult& results);
Status
QueryBruteForceImpl(query::QueryPtr query, Timestamp timestamp, QueryResult& results);
@ -168,12 +148,14 @@ class SegmentSmallIndex : public SegmentBase {
private:
SchemaPtr schema_;
std::atomic<SegmentState> state_ = SegmentState::Open;
Record record_;
DeletedRecord deleted_record_;
std::atomic<bool> index_ready_ = false;
IndexMetaPtr index_meta_;
std::unordered_map<std::string, knowhere::IndexPtr> indexings_; // index_name => indexing
InsertRecord record_;
DeletedRecord deleted_record_;
IndexingRecord indexing_record_;
// std::atomic<bool> index_ready_ = false;
// std::unordered_map<std::string, knowhere::IndexPtr> indexings_; // index_name => indexing
tbb::concurrent_unordered_multimap<idx_t, int64_t> uid2offset_;
};
} // namespace milvus::dog_segment
} // namespace milvus::segcore

View File

@ -6,7 +6,7 @@ NewCollection(const char* collection_name, const char* schema_conf) {
auto name = std::string(collection_name);
auto conf = std::string(schema_conf);
auto collection = std::make_unique<milvus::dog_segment::Collection>(name, conf);
auto collection = std::make_unique<milvus::segcore::Collection>(name, conf);
// TODO: delete print
std::cout << "create collection " << collection_name << std::endl;
@ -15,7 +15,7 @@ NewCollection(const char* collection_name, const char* schema_conf) {
void
DeleteCollection(CCollection collection) {
auto col = (milvus::dog_segment::Collection*)collection;
auto col = (milvus::segcore::Collection*)collection;
// TODO: delete print
std::cout << "delete collection " << col->get_collection_name() << std::endl;
@ -24,7 +24,7 @@ DeleteCollection(CCollection collection) {
void
UpdateIndexes(CCollection c_collection, const char* index_string) {
auto c = (milvus::dog_segment::Collection*)c_collection;
auto c = (milvus::segcore::Collection*)c_collection;
std::string s(index_string);
c->CreateIndex(s);
}

View File

@ -4,7 +4,7 @@
CPartition
NewPartition(CCollection collection, const char* partition_name) {
auto c = (milvus::dog_segment::Collection*)collection;
auto c = (milvus::segcore::Collection*)collection;
auto name = std::string(partition_name);
@ -12,7 +12,7 @@ NewPartition(CCollection collection, const char* partition_name) {
auto index = c->get_index();
auto partition = std::make_unique<milvus::dog_segment::Partition>(name, schema, index);
auto partition = std::make_unique<milvus::segcore::Partition>(name, schema, index);
// TODO: delete print
std::cout << "create partition " << name << std::endl;
@ -21,7 +21,7 @@ NewPartition(CCollection collection, const char* partition_name) {
void
DeletePartition(CPartition partition) {
auto p = (milvus::dog_segment::Partition*)partition;
auto p = (milvus::segcore::Partition*)partition;
// TODO: delete print
std::cout << "delete partition " << p->get_partition_name() << std::endl;

View File

@ -10,9 +10,9 @@
CSegmentBase
NewSegment(CPartition partition, unsigned long segment_id) {
auto p = (milvus::dog_segment::Partition*)partition;
auto p = (milvus::segcore::Partition*)partition;
auto segment = milvus::dog_segment::CreateSegment(p->get_schema());
auto segment = milvus::segcore::CreateSegment(p->get_schema());
// TODO: delete print
std::cout << "create segment " << segment_id << std::endl;
@ -21,7 +21,7 @@ NewSegment(CPartition partition, unsigned long segment_id) {
void
DeleteSegment(CSegmentBase segment) {
auto s = (milvus::dog_segment::SegmentBase*)segment;
auto s = (milvus::segcore::SegmentBase*)segment;
// TODO: delete print
std::cout << "delete segment " << std::endl;
@ -34,19 +34,19 @@ int
Insert(CSegmentBase c_segment,
long int reserved_offset,
signed long int size,
const long* primary_keys,
const long* row_ids,
const unsigned long* timestamps,
void* raw_data,
int sizeof_per_row,
signed long int count) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
milvus::dog_segment::DogDataChunk dataChunk{};
auto segment = (milvus::segcore::SegmentBase*)c_segment;
milvus::segcore::RowBasedRawData dataChunk{};
dataChunk.raw_data = raw_data;
dataChunk.sizeof_per_row = sizeof_per_row;
dataChunk.count = count;
auto res = segment->Insert(reserved_offset, size, primary_keys, timestamps, dataChunk);
auto res = segment->Insert(reserved_offset, size, row_ids, timestamps, dataChunk);
// TODO: delete print
// std::cout << "do segment insert, sizeof_per_row = " << sizeof_per_row << std::endl;
@ -55,7 +55,7 @@ Insert(CSegmentBase c_segment,
long int
PreInsert(CSegmentBase c_segment, long int size) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
// TODO: delete print
// std::cout << "PreInsert segment " << std::endl;
@ -63,20 +63,17 @@ PreInsert(CSegmentBase c_segment, long int size) {
}
int
Delete(CSegmentBase c_segment,
long int reserved_offset,
long size,
const long* primary_keys,
const unsigned long* timestamps) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
Delete(
CSegmentBase c_segment, long int reserved_offset, long size, const long* row_ids, const unsigned long* timestamps) {
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto res = segment->Delete(reserved_offset, size, primary_keys, timestamps);
auto res = segment->Delete(reserved_offset, size, row_ids, timestamps);
return res.code();
}
long int
PreDelete(CSegmentBase c_segment, long int size) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
// TODO: delete print
// std::cout << "PreDelete segment " << std::endl;
@ -91,8 +88,8 @@ PreDelete(CSegmentBase c_segment, long int size) {
// int num_of_query_raw_data,
// long int* result_ids,
// float* result_distances) {
// auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
// milvus::dog_segment::QueryResult query_result;
// auto segment = (milvus::segcore::SegmentBase*)c_segment;
// milvus::segcore::QueryResult query_result;
//
// // parse query param json
// auto query_param_json_string = std::string(query_json);
@ -125,8 +122,8 @@ Search(CSegmentBase c_segment,
int num_of_query_raw_data,
long int* result_ids,
float* result_distances) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
milvus::dog_segment::QueryResult query_result;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
milvus::segcore::QueryResult query_result;
// construct QueryPtr
auto query_ptr = std::make_shared<milvus::query::Query>();
@ -142,8 +139,8 @@ Search(CSegmentBase c_segment,
// result_ids and result_distances have been allocated memory in goLang,
// so we don't need to malloc here.
memcpy(result_ids, query_result.result_ids_.data(), query_result.row_num_ * sizeof(long int));
memcpy(result_distances, query_result.result_distances_.data(), query_result.row_num_ * sizeof(float));
memcpy(result_ids, query_result.result_ids_.data(), query_result.get_row_count() * sizeof(long int));
memcpy(result_distances, query_result.result_distances_.data(), query_result.get_row_count() * sizeof(float));
return res.code();
}
@ -152,15 +149,15 @@ Search(CSegmentBase c_segment,
int
Close(CSegmentBase c_segment) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto status = segment->Close();
return status.code();
}
int
BuildIndex(CCollection c_collection, CSegmentBase c_segment) {
auto collection = (milvus::dog_segment::Collection*)c_collection;
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto collection = (milvus::segcore::Collection*)c_collection;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto status = segment->BuildIndex(collection->get_index());
return status.code();
@ -168,14 +165,14 @@ BuildIndex(CCollection c_collection, CSegmentBase c_segment) {
bool
IsOpened(CSegmentBase c_segment) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto status = segment->get_state();
return status == milvus::dog_segment::SegmentBase::SegmentState::Open;
return status == milvus::segcore::SegmentBase::SegmentState::Open;
}
long int
GetMemoryUsageInBytes(CSegmentBase c_segment) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto mem_size = segment->GetMemoryUsageInBytes();
return mem_size;
}
@ -184,14 +181,14 @@ GetMemoryUsageInBytes(CSegmentBase c_segment) {
long int
GetRowCount(CSegmentBase c_segment) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto row_count = segment->get_row_count();
return row_count;
}
long int
GetDeletedCount(CSegmentBase c_segment) {
auto segment = (milvus::dog_segment::SegmentBase*)c_segment;
auto segment = (milvus::segcore::SegmentBase*)c_segment;
auto deleted_count = segment->get_deleted_count();
return deleted_count;
}

View File

@ -25,7 +25,7 @@ int
Insert(CSegmentBase c_segment,
long int reserved_offset,
signed long int size,
const long* primary_keys,
const long* row_ids,
const unsigned long* timestamps,
void* raw_data,
int sizeof_per_row,
@ -35,11 +35,8 @@ long int
PreInsert(CSegmentBase c_segment, long int size);
int
Delete(CSegmentBase c_segment,
long int reserved_offset,
long size,
const long* primary_keys,
const unsigned long* timestamps);
Delete(
CSegmentBase c_segment, long int reserved_offset, long size, const long* row_ids, const unsigned long* timestamps);
long int
PreDelete(CSegmentBase c_segment, long int size);

View File

@ -0,0 +1 @@
#include "Types.h"

View File

@ -138,9 +138,21 @@ struct AttrsData {
///////////////////////////////////////////////////////////////////////////////////////////////////
struct QueryResult {
uint64_t row_num_; // row_num_ = topK * num_queries_
QueryResult() = default;
QueryResult(uint64_t num_queries, uint64_t topK) : topK_(topK), num_queries_(num_queries) {
auto count = get_row_count();
result_ids_.resize(count);
result_distances_.resize(count);
}
[[nodiscard]] uint64_t
get_row_count() const {
return topK_ * num_queries_;
}
uint64_t num_queries_;
uint64_t topK_;
uint64_t num_queries_; // currently must be 1
// uint64_t total_row_count_; // total_row_count_ = topK * num_queries_
engine::ResultIds result_ids_; // top1, top2, ..;
engine::ResultDistances result_distances_;
// engine::DataChunkPtr data_chunk_;

View File

@ -4,7 +4,7 @@ include_directories(${CMAKE_HOME_DIRECTORY}/src)
include_directories(${CMAKE_HOME_DIRECTORY}/src/index/knowhere)
set(MILVUS_TEST_FILES
test_naive.cpp
test_dog_segment.cpp
test_segcore.cpp
test_concurrent_vector.cpp
test_c_api.cpp
test_indexing.cpp
@ -16,7 +16,7 @@ add_executable(all_tests
target_link_libraries(all_tests
gtest
gtest_main
milvus_dog_segment
milvus_segcore
knowhere
log
pthread

View File

@ -3,8 +3,8 @@
#include <random>
#include <gtest/gtest.h>
#include "dog_segment/collection_c.h"
#include "dog_segment/segment_c.h"
#include "segcore/collection_c.h"
#include "segcore/segment_c.h"
#include <chrono>
namespace chrono = std::chrono;
@ -85,12 +85,12 @@ TEST(CApiTest, DeleteTest) {
auto partition = NewPartition(collection, partition_name);
auto segment = NewSegment(partition, 0);
long delete_primary_keys[] = {100000, 100001, 100002};
long delete_row_ids[] = {100000, 100001, 100002};
unsigned long delete_timestamps[] = {0, 0, 0};
auto offset = PreDelete(segment, 3);
auto del_res = Delete(segment, offset, 3, delete_primary_keys, delete_timestamps);
auto del_res = Delete(segment, offset, 3, delete_row_ids, delete_timestamps);
assert(del_res == 0);
DeleteCollection(collection);
@ -444,15 +444,15 @@ TEST(CApiTest, GetDeletedCountTest) {
auto partition = NewPartition(collection, partition_name);
auto segment = NewSegment(partition, 0);
long delete_primary_keys[] = {100000, 100001, 100002};
long delete_row_ids[] = {100000, 100001, 100002};
unsigned long delete_timestamps[] = {0, 0, 0};
auto offset = PreDelete(segment, 3);
auto del_res = Delete(segment, offset, 3, delete_primary_keys, delete_timestamps);
auto del_res = Delete(segment, offset, 3, delete_row_ids, delete_timestamps);
assert(del_res == 0);
// TODO: assert(deleted_count == len(delete_primary_keys))
// TODO: assert(deleted_count == len(delete_row_ids))
auto deleted_count = GetDeletedCount(segment);
assert(deleted_count == 0);

View File

@ -17,18 +17,18 @@
#include <thread>
#include <vector>
#include "dog_segment/ConcurrentVector.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/ConcurrentVector.h"
#include "segcore/SegmentBase.h"
// #include "knowhere/index/vector_index/helpers/IndexParameter.h"
#include "dog_segment/SegmentBase.h"
#include "dog_segment/AckResponder.h"
#include "segcore/SegmentBase.h"
#include "segcore/AckResponder.h"
using std::cin;
using std::cout;
using std::endl;
using namespace milvus::engine;
using namespace milvus::dog_segment;
using namespace milvus::segcore;
using std::vector;
TEST(ConcurrentVector, TestABI) {

View File

@ -7,12 +7,12 @@
#include <vector>
#include <faiss/utils/distances.h>
#include "dog_segment/ConcurrentVector.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/ConcurrentVector.h"
#include "segcore/SegmentBase.h"
// #include "knowhere/index/vector_index/helpers/IndexParameter.h"
#include "dog_segment/SegmentBase.h"
#include "dog_segment/AckResponder.h"
#include "segcore/SegmentBase.h"
#include "segcore/AckResponder.h"
#include <knowhere/index/vector_index/VecIndex.h>
#include <knowhere/index/vector_index/adapter/VectorAdapter.h>
#include <knowhere/index/vector_index/VecIndexFactory.h>
@ -25,7 +25,7 @@ using std::cin;
using std::cout;
using std::endl;
using namespace milvus::engine;
using namespace milvus::dog_segment;
using namespace milvus::segcore;
using std::vector;
using namespace milvus;
@ -146,8 +146,8 @@ TEST(Indexing, SmartBruteForce) {
}
}
TEST(Indexing, Naive) {
constexpr int N = 100000;
TEST(Indexing, DISABLED_Naive) {
constexpr int N = 10000;
constexpr int DIM = 16;
constexpr int TOPK = 10;
@ -228,7 +228,7 @@ TEST(Indexing, IVFFlatNM) {
constexpr auto K = 10;
auto N = 1024 * 1024 * 10;
auto num_query = 1000;
auto num_query = 100;
Timer timer;
auto [raw_data, timestamps, uids] = generate_data<DIM>(N);
std::cout << "generate data: " << timer.get_step_seconds() << " seconds" << endl;

View File

@ -17,8 +17,9 @@
// #include "knowhere/index/vector_index/helpers/IndexParameter.h"
// #include "segment/SegmentReader.h"
// #include "segment/SegmentWriter.h"
#include "dog_segment/SegmentBase.h"
#include "segcore/SegmentBase.h"
// #include "utils/Json.h"
#include "test_utils/DataGen.h"
#include <random>
using std::cin;
using std::cout;
@ -50,15 +51,15 @@ generate_data(int N) {
}
} // namespace
TEST(DogSegmentTest, TestABI) {
TEST(SegmentCoreTest, TestABI) {
using namespace milvus::engine;
using namespace milvus::dog_segment;
using namespace milvus::segcore;
ASSERT_EQ(TestABI(), 42);
assert(true);
}
TEST(DogSegmentTest, NormalDistributionTest) {
using namespace milvus::dog_segment;
TEST(SegmentCoreTest, NormalDistributionTest) {
using namespace milvus::segcore;
using namespace milvus::engine;
auto schema = std::make_shared<Schema>();
schema->AddField("fakevec", DataType::VECTOR_FLOAT, 16);
@ -70,8 +71,8 @@ TEST(DogSegmentTest, NormalDistributionTest) {
segment->PreDelete(N);
}
TEST(DogSegmentTest, MockTest) {
using namespace milvus::dog_segment;
TEST(SegmentCoreTest, MockTest) {
using namespace milvus::segcore;
using namespace milvus::engine;
auto schema = std::make_shared<Schema>();
schema->AddField("fakevec", DataType::VECTOR_FLOAT, 16);
@ -99,7 +100,7 @@ TEST(DogSegmentTest, MockTest) {
// auto index_meta = std::make_shared<IndexMeta>(schema);
auto segment = CreateSegment(schema);
DogDataChunk data_chunk{raw_data.data(), (int)line_sizeof, N};
RowBasedRawData data_chunk{raw_data.data(), (int)line_sizeof, N};
auto offset = segment->PreInsert(N);
segment->Insert(offset, N, uids.data(), timestamps.data(), data_chunk);
QueryResult query_result;
@ -109,3 +110,13 @@ TEST(DogSegmentTest, MockTest) {
int i = 0;
i++;
}
TEST(SegmentCoreTest, SmallIndex) {
using namespace milvus::segcore;
using namespace milvus::engine;
auto schema = std::make_shared<Schema>();
schema->AddField("fakevec", DataType::VECTOR_FLOAT, 16);
schema->AddField("age", DataType::INT32);
int N = 1024 * 1024;
auto data = DataGen(schema, N);
}

View File

@ -0,0 +1,85 @@
#pragma once
#include "segcore/SegmentDefs.h"
#include <random>
#include <memory>
#include <cstring>
namespace milvus::segcore {
struct GeneratedData {
std::vector<char> rows_;
std::vector<std::vector<char>> cols_;
void
generate_rows(int N, SchemaPtr schema);
};
void
GeneratedData::generate_rows(int N, SchemaPtr schema) {
std::vector<int> offset_infos(schema->size() + 1, 0);
auto sizeof_infos = schema->get_sizeof_infos();
std::partial_sum(sizeof_infos.begin(), sizeof_infos.end(), offset_infos.begin() + 1);
auto len_per_row = offset_infos.back();
assert(len_per_row == schema->get_total_sizeof());
std::vector<char> result(len_per_row * N);
for (int index = 0; index < N; ++index) {
for (int fid = 0; fid < schema->size(); ++fid) {
auto len = sizeof_infos[fid];
auto offset = offset_infos[fid];
auto src = cols_[fid].data() + index * len;
auto dst = result.data() + offset + index * len_per_row;
memcpy(dst, src, len);
}
}
rows_ = std::move(result);
}
inline GeneratedData
DataGen(SchemaPtr schema, int64_t N) {
using std::vector;
std::vector<vector<char>> cols;
std::default_random_engine er(42);
std::normal_distribution<> distr(0, 1);
int offset = 0;
auto insert_cols = [&cols](auto& data) {
using T = std::remove_reference_t<decltype(data)>;
auto len = sizeof(typename T::value_type) * data.size();
auto ptr = vector<char>(len);
memcpy(ptr.data(), data.data(), len);
cols.emplace_back(std::move(ptr));
};
for (auto& field : schema->get_fields()) {
switch (field.get_data_type()) {
case engine::DataType::VECTOR_FLOAT: {
auto dim = field.get_dim();
vector<float> data(dim * N);
for (auto& x : data) {
x = distr(er) + offset;
}
insert_cols(data);
break;
}
case engine::DataType::INT32: {
vector<int> data(N);
int count = 0;
for (auto& x : data) {
x = count + offset * N;
++count;
}
insert_cols(data);
break;
}
default: {
throw std::runtime_error("unimplemented");
}
}
++offset;
}
GeneratedData res;
res.cols_ = std::move(cols);
res.generate_rows(N, schema);
return std::move(res);
}
} // namespace milvus::segcore

View File

@ -155,7 +155,7 @@ message InsertRequest {
int64 segment_id = 5;
int64 channel_id = 6;
int64 proxy_id = 7;
uint64 timestamp = 8;
repeated uint64 timestamps = 8;
repeated int64 row_ids = 9;
repeated common.Blob row_data = 10;
}
@ -167,7 +167,7 @@ message DeleteRequest {
string collection_name = 3;
int64 channel_id = 4;
int64 proxy_id = 5;
uint64 timestamp = 6;
repeated uint64 timestamp = 6;
repeated int64 primary_keys = 7;
}

View File

@ -942,7 +942,7 @@ type InsertRequest struct {
SegmentId int64 `protobuf:"varint,5,opt,name=segment_id,json=segmentId,proto3" json:"segment_id,omitempty"`
ChannelId int64 `protobuf:"varint,6,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
ProxyId int64 `protobuf:"varint,7,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"`
Timestamp uint64 `protobuf:"varint,8,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Timestamps []uint64 `protobuf:"varint,8,rep,packed,name=timestamps,proto3" json:"timestamps,omitempty"`
RowIds []int64 `protobuf:"varint,9,rep,packed,name=row_ids,json=rowIds,proto3" json:"row_ids,omitempty"`
RowData []*commonpb.Blob `protobuf:"bytes,10,rep,name=row_data,json=rowData,proto3" json:"row_data,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
@ -1024,11 +1024,11 @@ func (m *InsertRequest) GetProxyId() int64 {
return 0
}
func (m *InsertRequest) GetTimestamp() uint64 {
func (m *InsertRequest) GetTimestamps() []uint64 {
if m != nil {
return m.Timestamp
return m.Timestamps
}
return 0
return nil
}
func (m *InsertRequest) GetRowIds() []int64 {
@ -1051,7 +1051,7 @@ type DeleteRequest struct {
CollectionName string `protobuf:"bytes,3,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
ChannelId int64 `protobuf:"varint,4,opt,name=channel_id,json=channelId,proto3" json:"channel_id,omitempty"`
ProxyId int64 `protobuf:"varint,5,opt,name=proxy_id,json=proxyId,proto3" json:"proxy_id,omitempty"`
Timestamp uint64 `protobuf:"varint,6,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
Timestamp []uint64 `protobuf:"varint,6,rep,packed,name=timestamp,proto3" json:"timestamp,omitempty"`
PrimaryKeys []int64 `protobuf:"varint,7,rep,packed,name=primary_keys,json=primaryKeys,proto3" json:"primary_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
@ -1118,11 +1118,11 @@ func (m *DeleteRequest) GetProxyId() int64 {
return 0
}
func (m *DeleteRequest) GetTimestamp() uint64 {
func (m *DeleteRequest) GetTimestamp() []uint64 {
if m != nil {
return m.Timestamp
}
return 0
return nil
}
func (m *DeleteRequest) GetPrimaryKeys() []int64 {
@ -1546,76 +1546,77 @@ func init() {
func init() { proto.RegisterFile("internal_msg.proto", fileDescriptor_7eb37f6b80b23116) }
var fileDescriptor_7eb37f6b80b23116 = []byte{
// 1135 bytes of a gzipped FileDescriptorProto
// 1150 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe4, 0x58, 0x4b, 0x6f, 0x23, 0x45,
0x10, 0xde, 0xf1, 0xdb, 0xe5, 0xd8, 0x99, 0x74, 0x62, 0xe2, 0x5d, 0x1e, 0x1b, 0x66, 0x91, 0x58,
0xad, 0x84, 0x23, 0x1c, 0x0e, 0xec, 0x35, 0xf1, 0x21, 0x66, 0x95, 0x28, 0x1a, 0x47, 0x20, 0x21,
0xa1, 0xd1, 0x78, 0xa6, 0xb0, 0x5b, 0xf3, 0x4c, 0x77, 0x3b, 0xc1, 0xb9, 0x73, 0x07, 0x71, 0xe4,
0xc6, 0x99, 0x03, 0x3f, 0x83, 0xd7, 0x9d, 0x3f, 0x01, 0x82, 0x95, 0x40, 0x5c, 0x51, 0xf7, 0x8c,
0x1f, 0xe3, 0x24, 0xe6, 0x21, 0x56, 0x8a, 0x94, 0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73, 0xfa, 0x0f, 0x1a, 0xd9, 0x06, 0xe2, 0x5d, 0xe8, 0x78,
0xf4, 0x1f, 0x35, 0xb2, 0x05, 0xeb, 0x5e, 0xa6, 0x2d, 0xe0, 0xfa, 0x4f, 0x1a, 0x59, 0x83, 0xb2,
0x97, 0xfc, 0x72, 0xea, 0x9f, 0xe7, 0x95, 0x94, 0x54, 0x73, 0xfd, 0x8b, 0x44, 0x4a, 0x5e, 0xb6,
0xfe, 0x47, 0x9e, 0x34, 0xa0, 0xea, 0xc9, 0x94, 0x3e, 0xa6, 0x8e, 0xa7, 0x7f, 0x5b, 0x7d, 0xf4,
0x04, 0x2a, 0xb3, 0x7f, 0x4a, 0x08, 0x40, 0xe9, 0xc0, 0xe6, 0x02, 0x99, 0x7e, 0x47, 0x7e, 0x9b,
0x68, 0xbb, 0xc8, 0x74, 0x4d, 0x7e, 0x7f, 0xc8, 0xa8, 0xd4, 0xe7, 0x24, 0xa5, 0x47, 0xf2, 0xe9,
0xea, 0xf9, 0xa7, 0xbd, 0x8f, 0x9e, 0x8e, 0xa8, 0x18, 0x4f, 0x86, 0xb2, 0x18, 0xec, 0x9e, 0x53,
0xdf, 0xa7, 0xe7, 0x02, 0x9d, 0xf1, 0x6e, 0x92, 0x19, 0x6f, 0xbb, 0x94, 0x0b, 0x46, 0x87, 0x13,
0x81, 0xee, 0xee, 0x2c, 0x3f, 0x76, 0x55, 0xba, 0xcc, 0xc5, 0x78, 0x38, 0x2c, 0x29, 0xcd, 0xe3,
0xbf, 0x02, 0x00, 0x00, 0xff, 0xff, 0x8d, 0x88, 0x67, 0xba, 0x49, 0x12, 0x00, 0x00,
}

View File

@ -30,7 +30,7 @@ message RowBatch {
string collection_name = 1;
string partition_tag = 2;
repeated common.Blob row_data = 3;
repeated int32 hash_values = 4;
repeated int32 hash_keys = 4;
}
@ -95,8 +95,8 @@ message IntegerListResponse {
*/
message IntegerRangeResponse {
common.Status status = 1;
repeated int64 begin = 2;
repeated int64 end = 3;
int64 begin = 2;
int64 end = 3;
}

View File

@ -118,7 +118,7 @@ type RowBatch struct {
CollectionName string `protobuf:"bytes,1,opt,name=collection_name,json=collectionName,proto3" json:"collection_name,omitempty"`
PartitionTag string `protobuf:"bytes,2,opt,name=partition_tag,json=partitionTag,proto3" json:"partition_tag,omitempty"`
RowData []*commonpb.Blob `protobuf:"bytes,3,rep,name=row_data,json=rowData,proto3" json:"row_data,omitempty"`
HashValues []int32 `protobuf:"varint,4,rep,packed,name=hash_values,json=hashValues,proto3" json:"hash_values,omitempty"`
HashKeys []int32 `protobuf:"varint,4,rep,packed,name=hash_keys,json=hashKeys,proto3" json:"hash_keys,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -170,9 +170,9 @@ func (m *RowBatch) GetRowData() []*commonpb.Blob {
return nil
}
func (m *RowBatch) GetHashValues() []int32 {
func (m *RowBatch) GetHashKeys() []int32 {
if m != nil {
return m.HashValues
return m.HashKeys
}
return nil
}
@ -491,8 +491,8 @@ func (m *IntegerListResponse) GetValues() []int64 {
// @brief Range response, [begin, end)
type IntegerRangeResponse struct {
Status *commonpb.Status `protobuf:"bytes,1,opt,name=status,proto3" json:"status,omitempty"`
Begin []int64 `protobuf:"varint,2,rep,packed,name=begin,proto3" json:"begin,omitempty"`
End []int64 `protobuf:"varint,3,rep,packed,name=end,proto3" json:"end,omitempty"`
Begin int64 `protobuf:"varint,2,opt,name=begin,proto3" json:"begin,omitempty"`
End int64 `protobuf:"varint,3,opt,name=end,proto3" json:"end,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
@ -530,18 +530,18 @@ func (m *IntegerRangeResponse) GetStatus() *commonpb.Status {
return nil
}
func (m *IntegerRangeResponse) GetBegin() []int64 {
func (m *IntegerRangeResponse) GetBegin() int64 {
if m != nil {
return m.Begin
}
return nil
return 0
}
func (m *IntegerRangeResponse) GetEnd() []int64 {
func (m *IntegerRangeResponse) GetEnd() int64 {
if m != nil {
return m.End
}
return nil
return 0
}
//*
@ -836,47 +836,47 @@ func init() {
func init() { proto.RegisterFile("service_msg.proto", fileDescriptor_b4b40b84dd2f74cb) }
var fileDescriptor_b4b40b84dd2f74cb = []byte{
// 662 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0xcf, 0x6f, 0xd3, 0x30,
0x14, 0x56, 0x9a, 0xb6, 0x6c, 0xaf, 0x5d, 0x19, 0xa1, 0xa0, 0xb2, 0x1d, 0x28, 0x99, 0x06, 0xbd,
0xd0, 0x8a, 0x0d, 0x09, 0x71, 0xe0, 0xb0, 0x6e, 0x07, 0x18, 0x08, 0x0d, 0x17, 0x90, 0x80, 0x43,
0xe5, 0x24, 0x56, 0x62, 0xc9, 0x89, 0x2b, 0xdb, 0xd9, 0xb4, 0x5d, 0xf9, 0x83, 0x38, 0xf1, 0x37,
0x70, 0xe3, 0x6f, 0x42, 0xb1, 0xdd, 0x5f, 0x53, 0x40, 0x63, 0xeb, 0xcd, 0x7e, 0x79, 0xef, 0x7d,
0xef, 0xfb, 0xf2, 0xfc, 0xc1, 0x1d, 0x49, 0xc4, 0x29, 0x0d, 0xc9, 0x38, 0x95, 0x71, 0x7f, 0x22,
0xb8, 0xe2, 0x5e, 0x3b, 0xa5, 0xec, 0x34, 0x97, 0xe6, 0xd6, 0xb7, 0xdf, 0xb7, 0x9a, 0x21, 0x4f,
0x53, 0x9e, 0x99, 0xe8, 0x56, 0x53, 0x86, 0x09, 0x49, 0xb1, 0xb9, 0xf9, 0x2f, 0xa1, 0x75, 0xc8,
0x19, 0x23, 0xa1, 0xa2, 0x3c, 0x7b, 0x8f, 0x53, 0xe2, 0x3d, 0x81, 0xdb, 0xe1, 0x2c, 0x32, 0xce,
0x70, 0x4a, 0x3a, 0x4e, 0xd7, 0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xb5, 0xe8, 0xa0, 0x48, 0x17, 0xac, 0x82, 0xc9,
0x33, 0xa8, 0x8d, 0x42, 0x2e, 0xca, 0x2c, 0x69, 0x79, 0x85, 0x2a, 0xb3, 0x15, 0xfa, 0xee, 0x40,
0xf5, 0x35, 0x55, 0xda, 0x28, 0x68, 0x54, 0x30, 0xd5, 0x3f, 0x9a, 0x46, 0x72, 0xc9, 0x42, 0x2b,
0x57, 0xb6, 0xd0, 0x42, 0xb4, 0x62, 0x86, 0x29, 0x85, 0xed, 0x72, 0x05, 0xf4, 0x9c, 0xc8, 0xa6,
0xfa, 0x02, 0x1a, 0xda, 0xfe, 0x10, 0x91, 0x39, 0x53, 0xd7, 0x13, 0xbe, 0x0f, 0xd5, 0x84, 0x2a,
0x69, 0x47, 0xdd, 0x2a, 0x87, 0x2d, 0xa8, 0x22, 0x9d, 0x37, 0x3c, 0xfc, 0x7a, 0x10, 0x53, 0x95,
0xe4, 0x41, 0xd1, 0x6f, 0x70, 0x41, 0x19, 0xa3, 0x17, 0x8a, 0x84, 0xc9, 0xc0, 0x14, 0x3e, 0x8d,
0xa8, 0x54, 0x82, 0x06, 0xb9, 0x22, 0xd1, 0x80, 0x66, 0x8a, 0x88, 0x0c, 0xb3, 0x81, 0xee, 0x36,
0xb0, 0xdd, 0x26, 0x41, 0x50, 0xd7, 0x81, 0xfd, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0xce, 0x67,
0x71, 0xe7, 0x96, 0x07, 0x00, 0x00,
// 665 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xac, 0x54, 0x4f, 0x6f, 0xd3, 0x3e,
0x18, 0x56, 0x9a, 0xb6, 0xbf, 0xf6, 0x6d, 0xd7, 0xdf, 0x08, 0x05, 0x95, 0xed, 0x52, 0x32, 0x0d,
0x7a, 0xa1, 0x15, 0x1b, 0x12, 0xe2, 0xc0, 0x61, 0xdd, 0x0e, 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c9, 0x1c, 0xea, 0x56, 0xf9, 0x58, 0x4d, 0x15, 0x99, 0xbc, 0xf1, 0xe1, 0xe7,
0x83, 0x90, 0xaa, 0x28, 0xf5, 0x74, 0xbf, 0xd1, 0x05, 0x65, 0x8c, 0x5e, 0x28, 0xe2, 0x47, 0xa3,
0xac, 0xf0, 0x49, 0x40, 0xa5, 0x12, 0xd4, 0x4b, 0x15, 0x09, 0x46, 0x34, 0x51, 0x44, 0x24, 0x98,
0x8d, 0x4c, 0xb7, 0x51, 0xde, 0x6d, 0xe6, 0x79, 0x75, 0x13, 0xd8, 0xff, 0x1d, 0x00, 0x00, 0xff,
0xff, 0x49, 0xd7, 0x76, 0xe4, 0x92, 0x07, 0x00, 0x00,
}

View File

@ -185,7 +185,7 @@ func (s *proxyServer) Insert(ctx context.Context, req *servicepb.RowBatch) (*ser
if len(req.RowData) == 0 { //primary key is empty, set primary key by server
log.Printf("Set primary key")
}
if len(req.HashValues) != len(req.RowData) {
if len(req.HashKeys) != len(req.RowData) {
return &servicepb.IntegerRangeResponse{
Status: &commonpb.Status{
ErrorCode: commonpb.ErrorCode_UNEXPECTED_ERROR,
@ -194,8 +194,8 @@ func (s *proxyServer) Insert(ctx context.Context, req *servicepb.RowBatch) (*ser
}, nil
}
for i := 0; i < len(req.HashValues); i++ {
key := int64(req.HashValues[i])
for i := 0; i < len(req.HashKeys); i++ {
key := int64(req.HashKeys[i])
hash, err := typeutil.Hash32Int64(key)
if err != nil {
return nil, status.Errorf(codes.Unknown, "hash failed on %d", key)

View File

@ -4,7 +4,7 @@ package reader
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_dog_segment -Wl,-rpath=${SRCDIR}/../core/output/lib
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
#include "collection_c.h"
#include "partition_c.h"

View File

@ -4,7 +4,7 @@ package reader
#cgo CFLAGS: -I../core/output/include
#cgo LDFLAGS: -L../core/output/lib -lmilvus_dog_segment -Wl,-rpath=../core/output/lib
#cgo LDFLAGS: -L../core/output/lib -lmilvus_segcore -Wl,-rpath=../core/output/lib
#include "collection_c.h"
#include "partition_c.h"

View File

@ -4,7 +4,7 @@ package reader
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_dog_segment -Wl,-rpath=${SRCDIR}/../core/output/lib
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
#include "collection_c.h"
#include "partition_c.h"

View File

@ -4,7 +4,7 @@ package reader
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_dog_segment -Wl,-rpath=${SRCDIR}/../core/output/lib
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
#include "collection_c.h"
#include "partition_c.h"

View File

@ -4,7 +4,7 @@ package reader
#cgo CFLAGS: -I${SRCDIR}/../core/output/include
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_dog_segment -Wl,-rpath=${SRCDIR}/../core/output/lib
#cgo LDFLAGS: -L${SRCDIR}/../core/output/lib -lmilvus_segcore -Wl,-rpath=${SRCDIR}/../core/output/lib
#include "collection_c.h"
#include "partition_c.h"