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

[bug fix] Fix global cache in internal/cache/gache package #560

Merged
merged 1 commit into from
Jul 8, 2020

Conversation

kevindiu
Copy link
Contributor

@kevindiu kevindiu commented Jul 8, 2020

Description:

This PR fixed the global cache bug in internal package.
Since the defaultOps is a global instance and created only once, the instance will be shared among all the instance using gache or cache package.

This bug was discovered in #501.
This PR does not include the test code.

Related Issue:

How Has This Been Tested?:

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 8, 2020

Score: 1.00

Best reviewed: commit by commit


Optimal code review plan

     fix global cache

Powered by Pull Assistant. Last update b60bf67 ... b60bf67. Read the comment docs.

@github-actions github-actions bot added area/internal size/S type/bug Something isn't working labels Jul 8, 2020
@vdaas-ci
Copy link
Collaborator

vdaas-ci commented Jul 8, 2020

[CHATOPS:HELP] ChatOps commands.

  • 🙆‍♀️ /approve - approve
  • 💌 /changelog - add changelog comment
  • 🍱 /format - format codes and add licenses
  • /gen-test - generate test codes
  • 🏷️ /label - add labels
  • /rebase - rebase master

@kevindiu kevindiu mentioned this pull request Jul 8, 2020
18 tasks
@codecov
Copy link

codecov bot commented Jul 8, 2020

Codecov Report

Merging #560 into master will decrease coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master    #560      +/-   ##
=========================================
- Coverage    9.79%   9.78%   -0.02%     
=========================================
  Files         402     402              
  Lines       20859   20862       +3     
=========================================
- Hits         2044    2042       -2     
- Misses      18558   18564       +6     
+ Partials      257     256       -1     
Impacted Files Coverage Δ
internal/cache/gache/gache.go 0.00% <0.00%> (ø)
internal/cache/gache/option.go 0.00% <0.00%> (-6.67%) ⬇️
internal/errgroup/group.go 93.42% <0.00%> (-1.32%) ⬇️

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 37b66db...b60bf67. Read the comment docs.

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

@kpango kpango merged commit c52ca18 into master Jul 8, 2020
@kpango kpango deleted the bug/internal/cache branch July 8, 2020 06:58
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