Skip to content
This repository has been archived by the owner on Feb 27, 2023. It is now read-only.

refactor: redefine the behavior of SupernodeLocator #1324

Merged
merged 1 commit into from
May 6, 2020

Conversation

lowzj
Copy link
Member

@lowzj lowzj commented May 6, 2020

Signed-off-by: lowzj [email protected]

Ⅰ. Describe what this PR did

  • redefine the behavior of method Get: It should return nil before first calling the Next method.
  • add method Size to return the number of supernodes
  • fix the implementation of StaticLocator

Ⅱ. Does this pull request fix one issue?

Ⅲ. Why don't you add test cases (unit test/integration test)? (你真的觉得不需要加测试吗?)

Ⅳ. Describe how to verify it

Ⅴ. Special notes for reviews

@codecov-io
Copy link

codecov-io commented May 6, 2020

Codecov Report

Merging #1324 into master will decrease coverage by 0.01%.
The diff coverage is 75.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1324      +/-   ##
==========================================
- Coverage   51.41%   51.40%   -0.02%     
==========================================
  Files         125      125              
  Lines        8240     8241       +1     
==========================================
- Hits         4237     4236       -1     
- Misses       3660     3661       +1     
- Partials      343      344       +1     
Impacted Files Coverage Δ
dfget/core/core.go 45.21% <ø> (-0.58%) ⬇️
dfget/locator/locator.go 100.00% <ø> (ø)
dfget/locator/static_locator.go 80.64% <71.42%> (-2.41%) ⬇️
dfget/config/supernode_value.go 72.64% <100.00%> (ø)

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 44506bf...854074c. Read the comment docs.

@lowzj lowzj force-pushed the locator-interface branch from 10e1296 to 1d87778 Compare May 6, 2020 11:08
* redefine the behavior of method Get: It should return nil before first calling the Next method.
* add method Size to return the number of supernodes
* fix the implementation of StaticLocator

Signed-off-by: lowzj <[email protected]>
@lowzj lowzj force-pushed the locator-interface branch from 1d87778 to 854074c Compare May 6, 2020 12:48
@starnop
Copy link
Contributor

starnop commented May 6, 2020

LGTM.

@starnop starnop merged commit 0d3e9b2 into dragonflyoss:master May 6, 2020
@lowzj lowzj deleted the locator-interface branch May 7, 2020 03:09
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants