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

Make persistent storage synchronization interval configurable #1285

Open
wants to merge 3 commits into
base: openssl
Choose a base branch
from

Conversation

hakunamtu
Copy link

The option allows users to make disk io/memory usage tradeoffs themselves. Zero interval means saving only at exit, profiles are stored in memory.

@orignal
Copy link
Contributor

orignal commented Jan 20, 2019

will be merged after release 2.23

libi2pd/NetDb.cpp Outdated Show resolved Hide resolved
{
SaveUpdated ();
RemoveExpired ();
Copy link
Member

Choose a reason for hiding this comment

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

Removing every minute?

Copy link
Author

Choose a reason for hiding this comment

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

As the old SaveUpdated did.

Copy link
Contributor

Choose a reason for hiding this comment

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

It must be with interval as specified in this config parameter. Otherwise you might end up with empty netdb quickly

Copy link
Author

Choose a reason for hiding this comment

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

Sorry for the long delay. As far as I can see, doing it less frequently allows netdb to bloat uncontrollably. One apparent issue that needs to be fixed is that recently updated (IsUpdated() == true) but now unreachable records are deleted from netdb, which deviates from existing behaviour. Otherwise netdb service does the same thing, except for less frequent disk writes. If there is something else I fail to see, please, tell me.

Copy link
Author

Choose a reason for hiding this comment

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

Also persisting netDb on exit does not work with the default systemd unit's stop signal - SIGQUIT.

@r4sas r4sas force-pushed the openssl branch 3 times, most recently from d417a9b to 38a2d45 Compare August 13, 2021 06:08
@AVAtarMod
Copy link
Contributor

Why this PR not closed yet? As I know, it was merged after 2.23?

@orignal
Copy link
Contributor

orignal commented Jun 26, 2022

Потому что не фонтан

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.

None yet

4 participants