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

fix: DNS TTL not respected #1442

Conversation

ninabarbakadze
Copy link
Member

@ninabarbakadze ninabarbakadze commented Jul 30, 2024

Description

Fixes #1425

Testing

Testing DNS change is not really possible in unit tests so @smuu agreed to help me test manually

@ninabarbakadze ninabarbakadze force-pushed the nina/fix-dns-ttl-ignored branch from 77ca2a5 to 5f27f7b Compare July 31, 2024 13:35
@ninabarbakadze ninabarbakadze marked this pull request as ready for review July 31, 2024 15:02
@ninabarbakadze ninabarbakadze requested a review from a team as a code owner July 31, 2024 15:02
@ninabarbakadze ninabarbakadze requested review from cmwaters, staheri14 and evan-forbes and removed request for a team July 31, 2024 15:02
Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

This all looks good. The only hesitation I have is that reconnectPeer is relentless. It's designed for persistent peers, not for normal peers that you want to connect to. Thus, afaik, it ignores errors and continuously redials.

When trying to reconnect, if this fails we should give up trying to connect the peer. I would suggest we add some additional input to the reconnectToPeer method which will distinguish between retry forever and retry once and if failed log an error

@ninabarbakadze ninabarbakadze force-pushed the nina/fix-dns-ttl-ignored branch from 3d32731 to 9c47113 Compare August 6, 2024 17:02

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ninabarbakadze
Copy link
Member Author

This all looks good. The only hesitation I have is that reconnectPeer is relentless. It's designed for persistent peers, not for normal peers that you want to connect to. Thus, afaik, it ignores errors and continuously redials.

When trying to reconnect, if this fails we should give up trying to connect the peer. I would suggest we add some additional input to the reconnectToPeer method which will distinguish between retry forever and retry once and if failed log an error

For context here the peer won't try to reconnect forever. It first tries to connect 20 times with 5 second intervals(20*5=100s), then another 10 times with exponential backoff which ends in 16h(3**10 = 16hrs). it will give up after that so no change needed.

Copy link
Contributor

@cmwaters cmwaters left a comment

Choose a reason for hiding this comment

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

👍 Thanks @ninabarbakadze

Copy link
Member Author

@ninabarbakadze ninabarbakadze left a comment

Choose a reason for hiding this comment

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

should i merge this? @cmwaters @evan-forbes

I don't think dev ops was able to test this yet

@evan-forbes
Copy link
Member

evan-forbes commented Aug 23, 2024

yeah, we should merge imo

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
@ninabarbakadze ninabarbakadze enabled auto-merge (squash) August 23, 2024 13:16
@ninabarbakadze ninabarbakadze merged commit 0d2b638 into celestiaorg:v0.34.x-celestia Aug 23, 2024
17 of 18 checks passed
@ninabarbakadze ninabarbakadze deleted the nina/fix-dns-ttl-ignored branch August 23, 2024 13:53
rach-id pushed a commit that referenced this pull request Nov 18, 2024
## Description

Fixes #1425 

## Testing

Testing DNS change is not really possible in unit tests so @smuu agreed
to help me test manually
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

DNS TTL Not Respected by celestia-core Leading to Potential Future Sync Issues
3 participants