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

Prune old nodes #267

Open
runabol opened this issue Nov 10, 2023 · 3 comments
Open

Prune old nodes #267

runabol opened this issue Nov 10, 2023 · 3 comments
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@runabol
Copy link
Owner

runabol commented Nov 10, 2023

The nodes table contain entries for both current online nodes and those that were online in the past. Over time the nodes table will grow indefinitely. A process should be put in place to prune old nodes -- say over 24 hours --- to prevent the table from getting too large.

@runabol runabol added enhancement New feature or request good first issue Good for newcomers labels Nov 10, 2023
@AKARSHITJOSHI
Copy link

Can we remove nodes where LastHeartbeatAt was 24 hrs ago ??

@runabol
Copy link
Owner Author

runabol commented Nov 14, 2023

Yea, node IDs are generated on every startup of the Tork process and never reused. After 5 minutes a node is considered offline. 24 hours seems quite safe. If for some random reason a worker sends a hearbeat more than 24 hours later it will simply create the record again in the DB.

@runabol
Copy link
Owner Author

runabol commented Nov 14, 2023

That being said, the TTL should probably be configurable in case certain administrators want to retain them longer for analysis purposes or some such thing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

2 participants