davsclaus commented on PR #26907:
URL: https://github.com/apache/camel/pull/26907#issuecomment-5846696067

   Closing in favour of CAMEL-25041, which replaces the JDK `WatchService` with 
a polling directory scan.
   
   The reason: this PR had to reconstruct "the files of one save" from a watch 
service that reports per-file events and gives no batch boundary — a key's 
events, plus whatever arrives in the next few polls, bounded by a timeout. A 
scan returns exactly the set of files that changed since the last scan, so the 
batch is free and the heuristic goes away. It also fixes a measured problem 
this PR does not touch: on macOS the `WatchService` falls back to polling, and 
although Camel applies `com.sun.nio.file.SensitivityWatchEventModifier.HIGH` to 
get the interval to 2 s, on JDK 25 the effective interval is still about 10 s.
   
   Carried into the new PR, because a scan does not subsume them:
   
   - applying the properties of a change before the routes are built, and 
reloading the routes of the change once;
   - reloading the files one at a time when the batch fails, so the reload 
still names the one file that is wrong (CAMEL-24860);
   - re-reading a file whose reload failed when the properties later change. 
This is the by-hand fix — save the route, read "Property with key [x] not 
found", add the property, save again — which is two saves minutes apart and 
cannot be coalesced by any scan interval.
   
   The work stays on `fix/CAMEL-25032` for reference.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to