Skip to content

Commit

Permalink
win32: increment recrawlCount on recrawl
Browse files Browse the repository at this point in the history
Summary:
Our telemetry appears to be showing that no sync_to_now request on Windows are
timing out, which feels surprising since we would expect queries being serviced
right after a recrawl to be timing out. To understand if recrawls are actually
happening, let's increment the recrawlCount counter which is being made
available in telemetry.

Reviewed By: genevievehelsel

Differential Revision: D50085940

fbshipit-source-id: 3c0b7e920bf74e28f8292c3687d12f89a38d3528
  • Loading branch information
xavierd authored and facebook-github-bot committed Oct 9, 2023
1 parent 7723c81 commit cb6a161
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions watchman/watcher/win32.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -236,9 +236,8 @@ void WinWatcher::readChangesThread(const std::shared_ptr<Root>& root) {
}

if (err == ERROR_NOTIFY_ENUM_DIR) {
logf(
ERR,
"GetOverlappedResult failed with ERROR_NOTIFY_ENUM_DIR, recrawling.\n");
root->recrawlTriggered(
"GetOverlappedResult failed with ERROR_NOTIFY_ENUM_DIR");
items.emplace_back(
w_string{root->root_path},
PendingFlags{W_PENDING_IS_DESYNCED | W_PENDING_RECURSIVE});
Expand All @@ -249,7 +248,7 @@ void WinWatcher::readChangesThread(const std::shared_ptr<Root>& root) {
}
} else {
if (bytes == 0) {
logf(ERR, "ReadDirectoryChangesW overflowed, recrawling.\n");
root->recrawlTriggered("ReadDirectoryChangesW overflowed");
items.emplace_back(
w_string{root->root_path},
PendingFlags{W_PENDING_IS_DESYNCED | W_PENDING_RECURSIVE});
Expand Down

0 comments on commit cb6a161

Please sign in to comment.