make magic-folder (downloader) polling interval configurable #2829

Closed
opened 2016-09-13 17:38:10 +00:00 by meejah · 7 comments
Owner

It's not currently possible to configure the polling interval for the magic-folder downloader.

Additionally, we should think about what a good default is (3 seconds was used during development, but that's way too short).

We also should document this behavior and say something about how to choose a default (e.g. maybe a rough estimate of how much traffic it means).

It's not currently possible to configure the polling interval for the magic-folder downloader. Additionally, we should think about what a good default is (3 seconds was used during development, but that's way too short). We also should document this behavior and say something about how to choose a default (e.g. maybe a *rough* estimate of how much traffic it means).
meejah added the
code-frontend-magic-folder
normal
defect
1.11.0
labels 2016-09-13 17:38:10 +00:00
meejah added this to the 1.12.0 milestone 2016-09-13 17:38:10 +00:00
Author
Owner

For a first cut, at least making "a" config-option is a must for 0.1.12

Longer term, it might be good to have other ways of scheduling magic-folder syncs. (e.g. even "only when told to" or schedule times of low-freq/high-freq, etc).

For a first cut, at least making "a" config-option is a must for 0.1.12 Longer term, it might be good to have other ways of scheduling magic-folder syncs. (e.g. even "only when told to" or schedule times of low-freq/high-freq, etc).
dawuud commented 2016-10-05 11:52:50 +00:00
Owner

I checked and currently MagicFolder defaults to a 1 second polling interval.

Here's I've changed it to 5 seconds default and made it configureable via a magic folder polling interval config file option:
https://github.com/david415/tahoe-lafs/tree/2829.magic_folder_polling_interval.0
https://github.com/david415/tahoe-lafs/commit/63e52c276ba3d2e13dd55b74d2c88e4456b168f4

I checked and currently [MagicFolder](wiki/MagicFolder) defaults to a 1 second polling interval. Here's I've changed it to 5 seconds default and made it configureable via a magic folder polling interval config file option: <https://github.com/david415/tahoe-lafs/tree/2829.magic_folder_polling_interval.0> <https://github.com/david415/tahoe-lafs/commit/63e52c276ba3d2e13dd55b74d2c88e4456b168f4>
dawuud commented 2016-10-06 13:02:35 +00:00
Owner

upon looking at the code more closely i don't understand why we have two delay variables in the queue mixin:

  1. turn delay
  2. scan interval

the scan interval only controls how often when_queue_is_empty is called which is only used by the Downloader which performs a remote collective dir scan every scan interval. having the scan interval and the turn delay be different for the Downloader does nothing special.

the uploader doesn't even use when_queue_is_empty. it's a no-op.

can we get rid of scan_interval?
I certainly do not like shadowing variable in mixins and in the inheriting class.

upon looking at the code more closely i don't understand why we have two delay variables in the queue mixin: 1. turn delay 2. scan interval the scan interval only controls how often when_queue_is_empty is called which is only used by the Downloader which performs a remote collective dir scan every scan interval. having the scan interval and the turn delay be different for the Downloader does nothing special. the uploader doesn't even use when_queue_is_empty. it's a no-op. can we get rid of scan_interval? I certainly do not like shadowing variable in mixins and in the inheriting class.
dawuud commented 2016-10-06 14:21:01 +00:00
Owner

i added more commits to that dev branch experimenting with removing scan_interval. it did not work out so well. the unit tests... many of them fail. not sure why.

i added more commits to that dev branch experimenting with removing scan_interval. it did not work out so well. the unit tests... many of them fail. not sure why.
Author
Owner
See <https://github.com/tahoe-lafs/tahoe-lafs/pull/371>

Landed in [233d0e2].

Landed in [233d0e2].
meejah added the
fixed
label 2016-10-31 21:14:55 +00:00
Author
Owner

Closed as fixed since the PR was merged.

Closed as fixed since the PR was merged.
Sign in to join this conversation.
No Milestone
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Reference: tahoe-lafs/trac-2024-07-25#2829
No description provided.