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

[agent-ngt] use Len and InsertVCacheLen method for IndexInfo / add mutex for (Create|Save)Index #536

Merged
merged 3 commits into from
Jul 2, 2020

Conversation

rinx
Copy link
Contributor

@rinx rinx commented Jul 1, 2020

Signed-off-by: Rintaro Okamura rintaro.okamura@gmail.com

Description:

use Len() and InsertVCacheLen() method for IndexInfo because the current implementation of IndexInfo does not returns correct values (maybe UUIDs method cannot count too many index).

add mutex for CreateIndex & SaveIndex.

Related Issue:

nothing.

How Has This Been Tested?:

nothing.

Environment:

  • Go Version: 1.14.3
  • Docker Version: 19.03.8
  • Kubernetes Version: 1.18.2
  • NGT Version: 1.11.5

Types of changes:

  • Bug fix [type/bug]
  • New feature [type/feature]
  • Add tests [type/test]
  • Security related changes [type/security]
  • Add documents [type/documentation]
  • Refactoring [type/refactoring]
  • Update dependencies [type/dependency]
  • Update benchmarks and performances [type/bench]
  • Update CI [type/ci]

Changes to Core Features:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your core changes, as applicable?
  • Have you successfully ran tests with your changes locally?

Checklist:

  • I have read the CONTRIBUTING document.
  • I have checked open Pull Requests for the similar feature or fixes?
  • I have added tests and benchmarks to cover my changes.
  • I have ensured all new and existing tests passed.
  • I have commented my code, particularly in hard-to-understand areas
  • I have updated the documentation accordingly.

@pull-assistant
Copy link

pull-assistant bot commented Jul 1, 2020

Score: 1.00

Best reviewed: commit by commit


Optimal code review plan

     ♻️ use Len() and InsertVCacheLen() method for IndexInfo

     ♻️ add mutex for create-index & save-index

     🔧 pass post_stop_timeout to sidecar observer service

Powered by Pull Assistant. Last update c7ddefb ... 04a8d4a. Read the comment docs.

@codecov
Copy link

codecov bot commented Jul 1, 2020

Codecov Report

Merging #536 into master will increase coverage by 0.02%.
The diff coverage is 47.36%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #536      +/-   ##
=========================================
+ Coverage    9.16%   9.18%   +0.02%     
=========================================
  Files         402     402              
  Lines       20848   20859      +11     
=========================================
+ Hits         1910    1916       +6     
- Misses      18685   18690       +5     
  Partials      253     253              
Impacted Files Coverage Δ
pkg/agent/core/ngt/handler/grpc/handler.go 0.00% <0.00%> (ø)
pkg/agent/core/ngt/service/ngt.go 0.00% <0.00%> (ø)
pkg/agent/sidecar/usecase/sidecar/sidecar.go 0.00% <0.00%> (ø)
internal/runner/runner.go 91.30% <100.00%> (+0.47%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 76908b6...04a8d4a. Read the comment docs.

@rinx rinx changed the title [agent-ngt] use Len() and InsertVCacheLen() method for IndexInfo [agent-ngt] use Len and InsertVCacheLen method for IndexInfo / add mutex for (Create|Save)Index Jul 2, 2020
@rinx rinx force-pushed the refactor/agent-ngt/use-len-methods-for-index-info branch 2 times, most recently from 8352a14 to 4b03b33 Compare July 2, 2020 02:54
@rinx rinx requested a review from kpango July 2, 2020 03:07
kpango
kpango previously approved these changes Jul 2, 2020
Copy link
Collaborator

@kpango kpango left a comment

Choose a reason for hiding this comment

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

LGTM

rinx added 3 commits July 2, 2020 12:38
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
@rinx rinx force-pushed the refactor/agent-ngt/use-len-methods-for-index-info branch from 4b03b33 to 04a8d4a Compare July 2, 2020 03:39
@rinx
Copy link
Contributor Author

rinx commented Jul 2, 2020

/format

@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 2, 2020

[FORMAT] Updating license headers and formatting go codes triggered by rinx.

@kpango kpango merged commit 4205f6b into master Jul 2, 2020
@kpango kpango deleted the refactor/agent-ngt/use-len-methods-for-index-info branch July 2, 2020 04:39
kevindiu pushed a commit that referenced this pull request Jul 2, 2020
…for (Create|Save)Index (#536)

* ♻️ use Len() and InsertVCacheLen() method for IndexInfo

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

* ♻️ add mutex for create-index & save-index

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>

* 🔧 pass post_stop_timeout to sidecar observer service

Signed-off-by: Rintaro Okamura <rintaro.okamura@gmail.com>
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.

3 participants