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

[PoC]: fix discover forwarder #1440

Conversation

glazychev-art
Copy link
Contributor

@glazychev-art glazychev-art commented Mar 23, 2023

Description

If the forwarder is unavailable, we don't need to store its name.
But what do we need to do if the request returned an error?

Cases:
1. Forwarder is no longer available.
We need to clear the map with the forwarder name and find a new one on the re-request.
This solves the problem when several elements die - #1204

2. NSE is no longer available.
We can't just clear the map in this case. Because if Close is called next, we won't find anything in this map. But, the forwarder is fully reachable and contains interfaces.
Therefore, in case of a Request error, we set the flag "active", that will allow us to select a new forwarder in case of a re-request. And correctly Close the connection if necessary.

Issue link

#1434

How Has This Been Tested?

  • Added unit testing to cover
  • Tested manually
  • Tested by integration testing
  • Have not tested

Types of changes

  • Bug fix
  • New functionality
  • Documentation
  • Refactoring
  • CI

@glazychev-art glazychev-art force-pushed the fix_discoverforwarder branch 2 times, most recently from 647922a to 0418ec2 Compare March 23, 2023 13:41
@codecov
Copy link

codecov bot commented Mar 23, 2023

Codecov Report

❗ No coverage uploaded for pull request base (main@1c6df67). Click here to learn what that means.
Patch has no changes to coverable lines.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #1440   +/-   ##
=======================================
  Coverage        ?   71.48%           
=======================================
  Files           ?      235           
  Lines           ?    10539           
  Branches        ?        0           
=======================================
  Hits            ?     7534           
  Misses          ?     2535           
  Partials        ?      470           

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

Signed-off-by: Artem Glazychev <artem.glazychev@xored.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Cancelled
Development

Successfully merging this pull request may close these issues.

2 participants