Join GitHub today
GitHub is home to over 40 million developers working together to host and review code, manage projects, and build software together.Sign up
[pantsd] Don't ignore the first watchman event for the daemon pid #8096
The SchedulerService checks every event that changes the pantsd pidfile, and invalidates the daemon if the pid no longer is what it should be.
However, it also ignores the first event of every subscription. This is not something we want to do for the pidfile subscription, because if the pidfile changes between the time we write it and the time we subscribe to it and receive the first event, we will only receive the first event, and will continue on without invalidating the daemon.
This has happened in the following situation:
Not ignoring the first event for the pidfile.
More robust initialization of pantsds, where in the condition described above inv1 would check the pidfile and invalidate, leaving only inv2.
Commits are independently reviewable.