-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
[1.10] Fix issue 5696 #5714
[1.10] Fix issue 5696 #5714
Conversation
Signed-off-by: Lyndon-Li <lyonghui@vmware.com>
784e7fc
to
1b84610
Compare
Codecov Report
@@ Coverage Diff @@
## release-1.10 #5714 +/- ##
================================================
- Coverage 40.85% 40.83% -0.03%
================================================
Files 239 239
Lines 20629 20662 +33
================================================
+ Hits 8429 8437 +8
- Misses 11582 11608 +26
+ Partials 618 617 -1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
} | ||
|
||
bkRepo, err := urp.repoService.Open(ctx, *repoOption) | ||
if err == nil { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
BoostRepoConnect which means that we first need to close the repo and then reconnect no matter if it could be connected?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We try to connect the repo only when urp.repoService.Open
fails, the open is for a test purpose.
There is no reconnect, if urp.repoService.Open
succeeds, it means the repo has already been connected, so quit at line 228; otherwise, the repo may has not been connected, so call urp.ConnectToRepo
.
urp.repoService.Open
may fail for other reasons, this is out of the scope of this function to fix.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
first Open the repo, if no error, it will close the repo at L224.
So the repo will be closed before you do Forget, PruneRepo action?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The call of urp.repoService.Open
in function BoostRepoConnect
for test purpose only, outside BoostRepoConnect
, the caller will open the repo again own their own
Fix issue 5696, check if the repo is still openable before running the prune and forget operation, if it is not, try to reconnect the repo