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

Suppress saving stats file, and solve problem about on-memory cache #105

Merged
merged 10 commits into from
Oct 25, 2017

Conversation

ikedas
Copy link
Member

@ikedas ikedas commented Oct 18, 2017

When subscribers are imported, frequent write accesses to listdir/stats file occur. This issue was reported by a listmaster. According to investigation, content of this file must not being cached on memory, but rather be shared among processes.

Changes:

  • Changes on subscribers, owners and editors will be "published" by updating timestamps of .last_change.member and .last_change.admin files in list directory.
  • The last time of inclusion of subscribers, owners and editors will be published by updating timestamps of .last_sync.member and .last_sync.admin files in list directory.
  • 5th to 7th entries in stats file (total, last_sync, last_sync_admin) are removed.

Fixed bugs:

As a side work, barely effective cache by %list_cache and init_list_cache() were removed.

…ts file occur. This issue was reported by a listmaster.

Write accesses are caused to save total count of subscribers.  This information does essentially not have to be stored into disk: It can be got by database query.  This commit deprecated "total" field in stats file so that write accesses are suppressed.
Fixed by publishing the last sync by .last_sync.member file in list directory so that the last time of update may be shared among processes.
Fixed by publishing the last change and sync by .last_chage.member and .last_sync.member files in list directory so that the last time of update may be shared among processes.

This change possiblly can solve issue sympa-community#7.
… instance were deprecated. Instead, Sympa::List::update_stats() would be used.

Unneeded write accesses were suppressed, and thanks to file locking, following bug was fixed:
- [bug] X-sequqnce header field in distributed messages will occasionally not be increased.
@ikedas ikedas added this to the 6.2.24 milestone Oct 21, 2017
@ikedas ikedas merged commit 5d1be85 into sympa-community:sympa-6.2 Oct 25, 2017
@ikedas ikedas deleted the suppress_stats_saving branch October 25, 2017 01:22
@ikedas ikedas mentioned this pull request May 13, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant