mirror of
https://github.com/facebook/sapling.git
synced 2024-10-08 07:49:11 +03:00
08323479d6
Summary: In heap profiles we observed a lot of objects associated with the journal related to the subscription path. Those objects appear to be alive for the duration of the subscription session, so it gives us good reason to move forwards with updating to the newer thrift streaming API. This diff introduces a new endpoint `subscribeStream` that uses the new RSocket based subscription channel. Both the Eden server and the watchman client are able to deal with connections from/to old versions of the server which checks off the box around push safety. Once this is widely deployed we can remove `StreamingSubscriber.{cpp|h}` from the eden code base, and can remove the `legacySubscribe` code from the watchman code base. Reviewed By: strager Differential Revision: D9595967 fbshipit-source-id: 0843e56315f83f1e5fb9bc827b7ee6cf1bf507a6
29 lines
1.1 KiB
Thrift
29 lines
1.1 KiB
Thrift
include "eden/fs/service/eden.thrift"
|
|
namespace cpp2 facebook.eden
|
|
|
|
/** This file holds definitions for the streaming flavor of the Eden interface
|
|
* This is only available to cpp2 clients and won't compile for other
|
|
* language/runtimes. */
|
|
|
|
service StreamingEdenService extends eden.EdenService {
|
|
/** Request notification about changes to the journal for
|
|
* the specified mountPoint.
|
|
* The JournalPosition at the time of the subscribe call
|
|
* will be pushed to the client, and then each change will
|
|
* be pushed to the client in near-real-time.
|
|
* The client may then use methods like getFilesChangedSince()
|
|
* to determine the precise nature of the changes.
|
|
*/
|
|
stream<eden.JournalPosition> subscribe(
|
|
1: string mountPoint)
|
|
|
|
/** This is an implementation of the subscribe API using the
|
|
* new rsocket based streaming thrift protocol.
|
|
* The name is temporary: we want to make some API changes
|
|
* but want to start pushing out an implementation now because
|
|
* we've seen inflated memory usage for the older `subscribe`
|
|
* method above. */
|
|
stream eden.JournalPosition subscribeStreamTemporary(
|
|
1: string mountPoint)
|
|
}
|