Skip to content
New issue

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

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

Already on GitHub? # to your account

Add a function to check task existence in cdn #570

Merged
merged 7 commits into from
Aug 24, 2021
Merged

Add a function to check task existence in cdn #570

merged 7 commits into from
Aug 24, 2021

Conversation

zzy987
Copy link
Contributor

@zzy987 zzy987 commented Aug 23, 2021

When cdn check task existence in gc, it will call taskMgr.Get which will update the accessTimeMap in manager. I add a Exist method to replace the Get in gc.

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
@zzy987 zzy987 requested a review from 244372610 August 23, 2021 09:51
@zzy987 zzy987 requested a review from a team as a code owner August 23, 2021 09:51
@zzy987 zzy987 requested review from bergwolf and xujihui1985 August 23, 2021 09:51
zzy987 added 4 commits August 23, 2021 17:53
Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
@codecov-commenter
Copy link

codecov-commenter commented Aug 23, 2021

Codecov Report

Merging #570 (7ee69c7) into main (c34a6e7) will decrease coverage by 0.15%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #570      +/-   ##
==========================================
- Coverage   39.28%   39.13%   -0.16%     
==========================================
  Files          86       86              
  Lines        6641     6644       +3     
==========================================
- Hits         2609     2600       -9     
- Misses       3661     3675      +14     
+ Partials      371      369       -2     
Flag Coverage Δ
e2etests ∅ <ø> (∅)
unittests 39.13% <0.00%> (-0.16%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
cdnsystem/supervisor/task/manager.go 10.09% <0.00%> (-0.29%) ⬇️
client/daemon/peer/peertask_stream.go 54.35% <0.00%> (-3.14%) ⬇️

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
244372610
244372610 previously approved these changes Aug 23, 2021
Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
Copy link
Member

@gaius-qi gaius-qi left a comment

Choose a reason for hiding this comment

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

LGTM

@244372610 244372610 merged commit f180bd1 into dragonflyoss:main Aug 24, 2021
@zzy987 zzy987 deleted the fix/no-update-in-gc branch August 24, 2021 03:15
gaius-qi pushed a commit that referenced this pull request Jun 28, 2023
* fix: replace get with exist in gc

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* fix: no error in the if branch

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* fix: move accessTimeMap.Add from getTask into Get

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* fix: change return value

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* fix: remove log error for Exist don't return error

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: use mockgen

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>

* chore: merge submodule

Signed-off-by: zzy987 <67889264+zzy987@users.noreply.github.com>
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants