Skip to content

Commit ed9c7ca

Browse files
muirdmmeta-codesync[bot]
authored andcommitted
add peekCurrentJournalPosition() endpoint for sapling
Summary: This is like getCurrentJournalPosition, except it does not count as "observing" the current journal position for journal subscription purposes (i.e. does not unblock sending new notifications). Switch Sapling to use it for "sl debugwait" to ensure that Sapling is not increasing journal notification noise by constantly observing the journal position. If the server doesn't support it, we fall back to getCurrentJournalPosition. Reviewed By: MichaelCuevas Differential Revision: D95292274 fbshipit-source-id: 9b2685206416f1d33a693516f1c93b3572977d11
1 parent 2ffd0db commit ed9c7ca

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

eden/fs/service/eden.thrift

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2041,6 +2041,14 @@ struct ChangesSinceV2Result {
20412041
2: list<ChangeNotification> changes;
20422042
}
20432043

2044+
struct PeekCurrentJournalPositionRequest {
2045+
1: MountId mountId;
2046+
}
2047+
2048+
struct PeekCurrentJournalPositionResponse {
2049+
1: JournalPosition position;
2050+
}
2051+
20442052
/**
20452053
* Argument to changesSinceV2 API
20462054
*
@@ -2448,6 +2456,14 @@ service EdenService extends fb303_core.BaseService {
24482456
1: EdenError ex,
24492457
);
24502458

2459+
/** Like getCurrentJournalPosition but does not mark the journal as observed.
2460+
* Use this when you only need the current position and don't want to
2461+
* affect subscriber notification coalescing.
2462+
*/
2463+
PeekCurrentJournalPositionResponse peekCurrentJournalPosition(
2464+
1: PeekCurrentJournalPositionRequest params,
2465+
) throws (1: EdenError ex);
2466+
24512467
/** Returns the set of files (and dirs) that changed since a prior point.
24522468
* If fromPosition.mountGeneration is mismatched with the current
24532469
* mountGeneration, throws an EdenError with errorCode = ERANGE.

0 commit comments

Comments
 (0)