sapling/eden/fs/journal
Chad Austin 76409f59b7 avoid redundant change notifications when prior notifications have not been observed
Summary:
The communication protocol between edenfs and watchman is that edenfs
advertises that "something in the mount has changed!" and it's up to
watchman to call getFilesChangedSince or getCurrentJournalPosition to
inspect what has changed.

This diff avoids redundantly notifying "something in the mount has
changed!" between the initial notification and actually reading the
journal contents. This way, a Watchman subscription cannot (*) fall
behind, and memory usage stays approximately constant during heavy
write traffic.

Hopefully, this will prevent the kernel from thinking the edenfs mount
is a slow IO device under high memory pressure.

* Technically, if there were a multitude of subscribeStreamTemporary
  streams, and all but one was not calling getFilesChangedSince, it's
  possible that notifications could back up on the stuck
  subscriptions.

Reviewed By: wez

Differential Revision: D24090247

fbshipit-source-id: 6561c13e847b749c093adab75250df474d3210f9
2020-10-20 18:25:43 -07:00
..
test avoid redundant change notifications when prior notifications have not been observed 2020-10-20 18:25:43 -07:00
CMakeLists.txt journal: add tests to CMake 2020-05-07 10:07:31 -07:00
Journal.cpp avoid redundant change notifications when prior notifications have not been observed 2020-10-20 18:25:43 -07:00
Journal.h avoid redundant change notifications when prior notifications have not been observed 2020-10-20 18:25:43 -07:00
JournalDelta.cpp Tidy up license headers 2019-10-11 05:28:23 -07:00
JournalDelta.h Tidy up license headers 2019-10-11 05:28:23 -07:00