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

replace ephemeral deletion logic #2008

Merged
merged 8 commits into from
Jul 18, 2024

Conversation

kradalby
Copy link
Collaborator

this commit replaces the way we remove ephemeral nodes, currently they are deleted in a loop and we look at last seen time. This time is now only set when a node disconnects and there was a bug (#2006) where nodes that had never disconnected was deleted since they did not have a last seen.

The new logic will start an expiry timer when the node disconnects and delete the node from the database when the timer is up.

If the node reconnects within the expiry, the timer is cancelled.

Fixes #2006

this commit replaces the way we remove ephemeral nodes,
currently they are deleted in a loop and we look at last seen
time. This time is now only set when a node disconnects and
there was a bug (juanfont#2006) where nodes that had never disconnected
was deleted since they did not have a last seen.

The new logic will start an expiry timer when the node disconnects
and delete the node from the database when the timer is up.

If the node reconnects within the expiry, the timer is cancelled.

Fixes juanfont#2006

Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby force-pushed the kradalby/2006-ephemerals-get-deleted branch from 157930e to cb8c2fc Compare July 12, 2024 15:44
@kradalby kradalby marked this pull request as ready for review July 12, 2024 15:46
kradalby added 6 commits July 15, 2024 10:21
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
Signed-off-by: Kristoffer Dalby <[email protected]>
@kradalby kradalby merged commit 7e62031 into juanfont:main Jul 18, 2024
109 checks passed
@kradalby kradalby deleted the kradalby/2006-ephemerals-get-deleted branch July 18, 2024 08:02
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.

[Bug] lastSeen not updating, causing ephemeral nodes to be incorrectly removed
2 participants