Skip to content

Commit 01820a3

Browse files
Priyank Warkhedefacebook-github-bot
Priyank Warkhede
authored andcommitted
FsdbSyncManager gflag to enable patch publish
Summary: In FsdbSyncManager introduce gflag fsdb_publish_state_with_patches which can be set by client binaries to enable publishing state to FSDB using patches instead of deltas. Differential Revision: D75021159 fbshipit-source-id: 8e1611007a253f60fa6116e6e0e9c7eaf5d9bf51
1 parent 173790d commit 01820a3

File tree

2 files changed

+17
-1
lines changed

2 files changed

+17
-1
lines changed

fboss/fsdb/client/FsdbSyncManager.cpp

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,16 @@ DEFINE_bool(
77
false,
88
"Publish paths using thrift ids rather than names");
99

10-
namespace facebook::fboss::fsdb {} // namespace facebook::fboss::fsdb
10+
DEFINE_bool(
11+
fsdb_publish_state_with_patches,
12+
false,
13+
"Publish state to FSDB using Patches instead of Deltas, default false");
14+
15+
namespace facebook::fboss::fsdb {
16+
17+
PubSubType getFsdbStatePubType() {
18+
return FLAGS_fsdb_publish_state_with_patches ? PubSubType::PATCH
19+
: PubSubType::DELTA;
20+
}
21+
22+
} // namespace facebook::fboss::fsdb

fboss/fsdb/client/FsdbSyncManager.h

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,8 +17,12 @@
1717

1818
DECLARE_bool(publish_use_id_paths);
1919

20+
DECLARE_bool(fsdb_publish_state_with_patches);
21+
2022
namespace facebook::fboss::fsdb {
2123

24+
PubSubType getFsdbStatePubType();
25+
2226
template <typename PubRootT, bool EnablePatchAPIs = false>
2327
class FsdbSyncManager {
2428
public:

0 commit comments

Comments
 (0)