Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Agent, add canceled status for CreateIndex API and Update VQueue impl #1892

Merged
merged 1 commit into from
Dec 26, 2022

Conversation

kpango
Copy link
Collaborator

@kpango kpango commented Dec 13, 2022

Signed-off-by: kpango kpango@vdaas.org

Description:

This PR was created to correct several implementation issues that were found in the process of investigating bugs in the Vald Agent.

  1. Since Vald Agent's Create Index API currently only returns "Internal" when an error occurs, an API Status was added to investigate whether the error was caused by a timeout.
  2. When Vald Agent's Create Index is called by multiple threads, the execution itself is executed one thread at a time, but multiple threads accumulate in the execution waiting loop, so we added an implementation to limit the waiting queue to one.
  3. When many Insert Deletes are executed in multi-threading, the VQueue calculation order becomes extremely large and CreateIndex takes a lot of time, so the VQueue implementation was greatly revised.

Additional work:

  1. added long test for ngt service
  2. Added -short parameter to Makefile.d/test.mk to turn off the Long test by default.
  3. made the timeout of tests executed in Makefile.d/test.mk variable, so that it can be overridden at runtime.
  4. Added test assets to generate NegativeUniform vectors.

Related Issue:

Versions:

  • Go Version: 1.19.4
  • Docker Version: 20.10.8
  • Kubernetes Version: 1.22.0
  • NGT Version: 1.14.8

Checklist:

Special notes for your reviewer:

@vdaas-ci
Copy link
Collaborator

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - replace the PR body by changelog details
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase main
  • 🔚 2️⃣ 🔚 /label actions/e2e-deploy - run E2E deploy & integration test

@codecov
Copy link

codecov bot commented Dec 13, 2022

Codecov Report

Base: 50.23% // Head: 29.99% // Decreases project coverage by -20.24% ⚠️

Coverage data is based on head (6700ff3) compared to base (97eed29).
Patch coverage: 52.30% of modified lines in pull request are covered.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #1892       +/-   ##
===========================================
- Coverage   50.23%   29.99%   -20.25%     
===========================================
  Files         231      365      +134     
  Lines       13464    33701    +20237     
===========================================
+ Hits         6764    10107     +3343     
- Misses       6499    23186    +16687     
- Partials      201      408      +207     
Impacted Files Coverage Δ
cmd/tools/cli/loadtest/main.go 0.00% <ø> (ø)
hack/benchmark/assets/x1b/loader.go 0.00% <0.00%> (ø)
hack/benchmark/internal/assets/dataset.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/insert.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/operation.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/option.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/remove.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/search.go 0.00% <ø> (ø)
hack/benchmark/internal/operation/util.go 0.00% <ø> (ø)
...ck/benchmark/internal/starter/gateway/vald/vald.go 0.00% <0.00%> (ø)
... and 283 more

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report at Codecov.
📢 Do you have feedback about the report comment? Let us know in this issue.

@cloudflare-workers-and-pages
Copy link

cloudflare-workers-and-pages bot commented Dec 13, 2022

Deploying with  Cloudflare Pages  Cloudflare Pages

Latest commit: 6700ff3
Status: ✅  Deploy successful!
Preview URL: https://7f848783.vald.pages.dev
Branch Preview URL: https://investigate-create-index-fre.vald.pages.dev

View logs

@CLAassistant
Copy link

CLAassistant commented Dec 13, 2022

CLA assistant check
All committers have signed the CLA.

@github-actions github-actions bot added team/set SET team size/XXL and removed size/M labels Dec 13, 2022
@kpango kpango force-pushed the investigate/create-index/freeze-problem branch from ed9b17d to 4cf9e14 Compare December 13, 2022 12:12
internal/test/data/vector/gen.go Show resolved Hide resolved
pkg/agent/core/ngt/service/vqueue/queue.go Outdated Show resolved Hide resolved
internal/test/data/vector/gen.go Show resolved Hide resolved
pkg/agent/core/ngt/service/ngt_test.go Show resolved Hide resolved
pkg/agent/core/ngt/service/ngt_test.go Outdated Show resolved Hide resolved
@vdaas-ci
Copy link
Collaborator

Profile Report

typevald-agent-ngtvald-lb-gatewayvald-discoverervald-manager-index
cpu
heap
other images

@kpango kpango changed the title [Do not merge] add canceled status for CreateIndex api Refactor Agent, add canceled status for CreateIndex API and Update VQueue impl Dec 22, 2022
@kpango kpango force-pushed the investigate/create-index/freeze-problem branch 3 times, most recently from 27ff9bb to a9a1a32 Compare December 26, 2022 04:33
@vdaas vdaas deleted a comment from github-actions bot Dec 26, 2022
@kpango kpango force-pushed the investigate/create-index/freeze-problem branch 2 times, most recently from 9f65fc1 to 3e90fa2 Compare December 26, 2022 04:58
@kpango kpango force-pushed the investigate/create-index/freeze-problem branch 2 times, most recently from aa6359d to 60a5c06 Compare December 26, 2022 06:32
Signed-off-by: kpango <kpango@vdaas.org>
Copy link
Contributor

@hlts2 hlts2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@kpango kpango merged commit 63f3480 into main Dec 26, 2022
@kpango kpango deleted the investigate/create-index/freeze-problem branch December 26, 2022 09:28
@kpango kpango mentioned this pull request Jan 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants