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

Centralize business logic for starting background prefetch. #184

Merged

Conversation

jrbriggs
Copy link
Member

@jrbriggs jrbriggs commented Aug 17, 2018

Move the check for unattended enlistment from InProcessMount to BackgroundPrefetcher.

{
this.prefetchJobTimer = new Timer((state) => this.LaunchPrefetchJobIfIdle(), null, this.timerPeriod, this.timerPeriod);
this.tracer.RelatedInfo(nameof(BackgroundPrefetcher) + ": starting background prefetch timer");
}
else
{
this.tracer.RelatedInfo(nameof(BackgroundPrefetcher) + ": no configured cache server, not starting background prefetch timer");
this.tracer.RelatedInfo(nameof(BackgroundPrefetcher) + ": no configured cache server or enlistment is unattended, not starting background prefetch timer");
Copy link
Contributor

Choose a reason for hiding this comment

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

For diagnosing issues, it would be nice to keep these as two separate trace statements, so we know which reason caused it to be disabled.

Copy link
Member Author

Choose a reason for hiding this comment

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

@sanoursa I considered that, but it added some complexity to this logging path for little value, because just a few lines prior to this statement in the mount process log file is "GVFS_UNATTENDED" if the enlistment is running in unattend mode, and at the head of the mount process log we log the remote url and objects endpoint url. I think that should give us the information we would need to diagnose.

Thoughts?

Copy link
Contributor

Choose a reason for hiding this comment

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

Got it, yea that makes sense

Move the check for unattended enlistment from InProcessMount
to BackgroundPrefetcher.
@jrbriggs jrbriggs force-pushed the centralize-background-prefetch-enablement branch from 4d7a1d7 to 553615d Compare August 17, 2018 16:41
@jrbriggs jrbriggs merged commit 5c876fe into microsoft:master Aug 17, 2018
@jrbriggs jrbriggs deleted the centralize-background-prefetch-enablement branch August 17, 2018 17:25
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.

4 participants