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

Feature Request: Add support for local full scan separation and blocking loop in monitor mode #2518

Closed
JC-comp opened this issue Oct 17, 2023 · 6 comments
Labels
Feature Request Feature Request | Enhancement Request

Comments

@JC-comp
Copy link
Contributor

JC-comp commented Oct 17, 2023

Is your feature request related to a problem? Please describe.

The full scan issue for remote side is perfectly resolved in v2.5.x now, to further improve the system performance, I'm wondering if we can also not to perform a file system walk and database walk when receiving notification from hooks in monitor loop. So that we can save system resouces of repeatedly walk and polling.

Describe the solution you'd like

The idea is

  1. Use blocking inotify in seperate thread to replace a polling loop in main thread.
  2. In main thread, wait exact interval until next loop or until a wakeup signal from threads
  3. Seperate the behavior of event triggered and monitor loop triggered sync.
  4. For event triggered sync, only to handle gathered remote (/delta) and local (inotify) changes without a full local consistent check.
  5. For monitor loop triggered sync, full scan on both side. Or futher seperate flags for remote full scan and local full scan interval.

Describe alternatives you've considered

Not at this point.

Additional context

No response

@JC-comp JC-comp added the Feature Request Feature Request | Enhancement Request label Oct 17, 2023
@abraunegg
Copy link
Owner

@JC-comp

What you are most likely referring to is this messaging on an inotify event:

Sync with Microsoft OneDrive is complete
Scanning the local file system '~/OneDrive' for new data to upload ...
Received inotify delete event from operating system .. attempting item deletion as requested
Scanning the local file system '~/OneDrive' for new data to upload ...
Uploading new file ./testfile.txt ... done.

If so this is a bug - not a feature, as the 'path' that should be scanned, should only be the item that triggered the event.

@abraunegg
Copy link
Owner

abraunegg commented Oct 17, 2023

Confirmed this is a bug - as this is different from v2.4.x - will fix as a bug

@JC-comp
Copy link
Contributor Author

JC-comp commented Oct 17, 2023

Not exactly, what I am suggesting is

  1. About the local full scan triggered when receiving remotely webhook events(not inotify), can we do the same thing as what inotify is doing now? Only deal with records related to the changed item instead of a full database and filesystem walk.
  2. Performance improvement - Use blocking instead of polling to handle inotify and webhook events that can further reduce system resource usage. Make the program sleep when nothing is actually happening.

@abraunegg
Copy link
Owner

About the local full scan triggered when receiving remotely webhook events(not inotify), can we do the same thing as what inotify is doing now?

Webhooks are not in alpha-2 as yet

Performance improvement - Use blocking instead of polling to handle inotify and webhook events that can further reduce system resource usage. Make the program sleep when nothing is actually happening.

The system does sleep - in --monitor for one second, before checking for any inotify events, a new notification via webhook or if the monitor loop timer has expired

@abraunegg
Copy link
Owner

@JC-comp

I'm wondering if we can also not to perform a file system walk and database walk when receiving notification from hooks in monitor loop.

This 'bug' has been fixed with v2.5.0-alpha-2 GitHub version: v2.4.25-30-g75c071e

@abraunegg
Copy link
Owner

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

Repository owner locked as resolved and limited conversation to collaborators Oct 25, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Feature Request Feature Request | Enhancement Request
Projects
None yet
2 participants