Skip to content

Commit 2ffd0db

Browse files
muirdmmeta-codesync[bot]
authored andcommitted
journal: separate out read-only peekLatest
Summary: I have realized that Sapling's (and other things') use of getJournalPosition() has an unwanted side effect of setting lastModificationHasBeenObserved=true, which has interplay with EdenFS subscribers. Sapling isn't really observing anything, so we don't want to cause any disturbances. Fix by separating getLatest to observeLatest (which sets lastModificationHasBeenObserved=true) and peekLatest. Since peekLatest doesn't write, we can also separate into a read/write lock to avoid the exclusive mutex acquisition in getJournalPosition. The only caller I change in this commit to peekLatest is eden's use building its "status" cache key. I wanted to also change getCurrentJournalPosition (which is what "sl debugwait" calls), but it is necessary/intentional for getCurrentJournalPosition to set lastModificationHasBeenObserved=true based on callers' expected semantics. Reviewed By: MichaelCuevas Differential Revision: D95146037 fbshipit-source-id: ff658b57f1ebcb5e61d8fea4915cbd243bd8dbbb
1 parent 4fb8bd0 commit 2ffd0db

File tree

1 file changed

+0
-1
lines changed

1 file changed

+0
-1
lines changed

eden/fs/service/streamingeden.thrift

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,6 @@ service StreamingEdenService extends eden.EdenService {
156156
* never calls changesSinceV2 or getCurrentJournalPosition in
157157
* response to a notification on this stream, future notifications may not
158158
* arrive.
159-
160159
*/
161160
stream<eden.JournalPosition> streamJournalChanged(
162161
1: eden.PathString mountPoint,

0 commit comments

Comments
 (0)