Skip to content

Commit

Permalink
Remove time travel ralted testcase
Browse files Browse the repository at this point in the history
Signed-off-by: Enwei Jiao <[email protected]>
  • Loading branch information
jiaoew1991 committed Aug 9, 2023
1 parent e13b6b8 commit 040e7f6
Show file tree
Hide file tree
Showing 30 changed files with 263 additions and 1,585 deletions.
5 changes: 2 additions & 3 deletions internal/core/src/segcore/SegmentInterface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,11 +64,10 @@ SegmentInternalInterface::FillTargetEntry(const query::Plan* plan,
std::unique_ptr<SearchResult>
SegmentInternalInterface::Search(
const query::Plan* plan,
const query::PlaceholderGroup* placeholder_group,
Timestamp timestamp) const {
const query::PlaceholderGroup* placeholder_group) const {
std::shared_lock lck(mutex_);
check_search(plan);
query::ExecPlanNodeVisitor visitor(*this, timestamp, placeholder_group);
query::ExecPlanNodeVisitor visitor(*this, 1L << 63, placeholder_group);
auto results = std::make_unique<SearchResult>();
*results = visitor.get_moved_result(*plan->plan_node_);
results->segment_ = (void*)this;
Expand Down
6 changes: 2 additions & 4 deletions internal/core/src/segcore/SegmentInterface.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,7 @@ class SegmentInterface {

virtual std::unique_ptr<SearchResult>
Search(const query::Plan* Plan,
const query::PlaceholderGroup* placeholder_group,
Timestamp timestamp) const = 0;
const query::PlaceholderGroup* placeholder_group) const = 0;

virtual std::unique_ptr<proto::segcore::RetrieveResults>
Retrieve(const query::RetrievePlan* Plan, Timestamp timestamp) const = 0;
Expand Down Expand Up @@ -119,8 +118,7 @@ class SegmentInternalInterface : public SegmentInterface {

std::unique_ptr<SearchResult>
Search(const query::Plan* Plan,
const query::PlaceholderGroup* placeholder_group,
Timestamp timestamp) const override;
const query::PlaceholderGroup* placeholder_group) const override;

void
FillPrimaryKeys(const query::Plan* plan,
Expand Down
3 changes: 1 addition & 2 deletions internal/core/src/segcore/segment_c.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,6 @@ Search(CSegmentInterface c_segment,
CSearchPlan c_plan,
CPlaceholderGroup c_placeholder_group,
CTraceContext c_trace,
uint64_t timestamp,
CSearchResult* result) {
try {
auto segment = (milvus::segcore::SegmentInterface*)c_segment;
Expand All @@ -82,7 +81,7 @@ Search(CSegmentInterface c_segment,

auto span = milvus::tracer::StartSpan("SegcoreSearch", &ctx);

auto search_result = segment->Search(plan, phg_ptr, timestamp);
auto search_result = segment->Search(plan, phg_ptr);
if (!milvus::PositivelyRelated(
plan->plan_node_->search_info_.metric_type_)) {
for (auto& dis : search_result->distances_) {
Expand Down
1 change: 0 additions & 1 deletion internal/core/src/segcore/segment_c.h
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ Search(CSegmentInterface c_segment,
CSearchPlan c_plan,
CPlaceholderGroup c_placeholder_group,
CTraceContext c_trace,
uint64_t timestamp,
CSearchResult* result);

void
Expand Down
7 changes: 2 additions & 5 deletions internal/core/unittest/bench/bench_search.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,10 +90,8 @@ Search_GrowingIndex(benchmark::State& state) {
dataset_.timestamps_.data(),
dataset_.raw_);

Timestamp time = 10000000;

for (auto _ : state) {
auto qr = segment->Search(plan.get(), ph_group.get(), time);
auto qr = segment->Search(plan.get(), ph_group.get());
}
}

Expand Down Expand Up @@ -125,9 +123,8 @@ Search_Sealed(benchmark::State& state) {
segment->DropFieldData(milvus::FieldId(100));
segment->LoadIndex(info);
}
Timestamp time = 10000000;
for (auto _ : state) {
auto qr = segment->Search(plan.get(), ph_group.get(), time);
auto qr = segment->Search(plan.get(), ph_group.get());
}
}

Expand Down
Loading

0 comments on commit 040e7f6

Please sign in to comment.