Skip to content

Commit bd9bd56

Browse files
committed
addressed comments from @botengyao
Signed-off-by: Rohit Agrawal <rohit.agrawal@databricks.com>
1 parent abd6bce commit bd9bd56

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

source/common/filesystem/kqueue/watcher_impl.cc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,11 @@ absl::Status WatcherImpl::onKqueueEvent() {
118118
absl::StatusOr<PathSplitResult> pathname_or_error =
119119
file_system_.splitPathFromFilename(file->file_);
120120
if (!pathname_or_error.ok()) {
121-
// Use ENVOY_LOG_EVERY_POW_2 to avoid log spam since path failures are persistent.
122-
ENVOY_LOG_EVERY_POW_2(warn, "Failed to split path '{}': {}", file->file_,
123-
pathname_or_error.status().message());
121+
// Path split failure is permanent and we can't recover.
122+
// We remove the broken watch to avoid repeated failures.
123+
ENVOY_LOG(warn, "Failed to split path '{}', removing watch: {}", file->file_,
124+
pathname_or_error.status().message());
125+
removeWatch(file);
124126
continue;
125127
}
126128
PathSplitResult& pathname = pathname_or_error.value();

0 commit comments

Comments
 (0)