Claus Ibsen created CAMEL-24899:
-----------------------------------

             Summary: camel-core - a failed reload of the only route file keeps 
the previous routes running (restore from the last good definitions, not from 
disk)
                 Key: CAMEL-24899
                 URL: https://issues.apache.org/jira/browse/CAMEL-24899
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: Claus Ibsen
             Fix For: 4.23.0


CAMEL-24860 restores the previous routes after a failed reload by loading the 
previous sources again from disk, which works when the failing file is not the 
only one. When it is the only route file, the good version is gone from disk, 
and the app runs without routes until the next successful save, with the log 
saying so. In the camel-jbang-mcp stepwise benchmark every HTTP example is one 
file: a write that fails to load (an invalid file written with validate=false, 
CAMEL-248xx) takes the whole app down for the rest of the step, and the REST 
endpoints answer 404 while the model reads the log.

Keep the last successfully loaded route definitions (the model objects, not the 
file) per source, and on a failed reload of that source add them back, so the 
app keeps answering with the previous version of the file and the log says 
"Reload failed ...; the previous routes of <file> are still running".



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to