linkerd2-proxy/proxy
Eliza Weisman ae8b7d7391 proxy: Fix false positives in polling-based fs watches (#1140)
There are currently two issues which can lead to false positives (changes being
reported when files have not actually changed) in the polling-based filesystem
watch implementation. 

The first issue is that when checking each watched file for changes, the loop
iterating over each path currently short-circuits as soon as it detects a 
change. This means that if two or more files have changed, the first time we
poll the fs, we will see the first change, then if we poll again, we will see
the next change, and so on. 

This branch fixes that issue by always hashing all the watched files, even if a
change has already been detected. This way, if all the files change between one
poll and the next, we no longer generate additional change events until a file
actually changes again.

The other issue is that the old implementation would treat any instance of a 
"file not found" error as indicating that the file had been deleted, and 
generate a change event. This leads to changes repeatedly being detected as
long as a file does not exist, rather than a single time when the file's 
existence state actually changes.

This branch fixes that issue as well, by only generating change events on
"file not found" errors if the file existed the last time it was polled. 
Otherwise, if a file did not previously exist, we no longer generate a new 
event.

I've verified both of these fixes through manual testing, as well as a new
test for the second issue. The new test fails on master but passes on this
branch.

Signed-off-by: Eliza Weisman <eliza@buoyant.io>
2018-06-26 15:56:21 -07:00
..
benches Proxy: More carefully keep track of the reason TLS isn't used. (#1164) 2018-06-20 07:40:49 -10:00
futures-mpsc-lossy Prepare for the v0.3.0 release (#406) 2018-02-21 11:14:11 -08:00
router proxy/router: Implement LRU cache eviction (#925) 2018-05-10 19:06:31 -07:00
src proxy: Fix false positives in polling-based fs watches (#1140) 2018-06-26 15:56:21 -07:00
tests proxy: add HTTP/1.1 Upgrade support automatically (#1126) 2018-06-20 16:41:43 -07:00
Cargo.toml proxy: Fix false positives in polling-based fs watches (#1140) 2018-06-26 15:56:21 -07:00