Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion app/buck2_file_watcher/src/notify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,26 @@ impl NotifyFileData {
fn sync(self) -> (buck2_data::FileWatcherStats, Option<FileChangeTracker>) {
// The changes that go into the DICE transaction
let mut changed = FileChangeTracker::new();
let mut stats = FileWatcherStats::new(Default::default(), self.events.len());
// If we missed events, sync2() will drop the entire DICE graph. Surface that to
// telemetry/UI by reusing the fresh-instance fields the watchman path uses for
// the equivalent wipe.
let base = if self.missed_events {
buck2_data::FileWatcherStats {
fresh_instance: true,
fresh_instance_data: Some(buck2_data::FreshInstance {
new_mergebase: false,
cleared_dice: true,
cleared_dep_files: false,
}),
incomplete_events_reason: Some(
"notify dropped events (kernel queue overflow)".to_owned(),
),
..Default::default()
}
} else {
Default::default()
};
let mut stats = FileWatcherStats::new(base, self.events.len());
stats.add_ignored(self.ignored);

for (cell_path, event_kind) in self.events {
Expand Down
Loading