Skip to content

Unnecessary file reloading #318

@ktak-007

Description

@ktak-007

There is the problem with unnecessary file reloading in version 2.1.10.
To reproduce, run the command tail -f log/keter.log | grep "Watched file" and put .keter file into the incoming folder.
If this is a new application you will see:

... Watched file added
... Watched file modified
... Watched file unknown

If this is a new version of an existing application, you will see

... Watched file modified
... Watched file modified
... Watched file unknown

Second line here "Watched file modified" already is the reaction of FSN.watchTree on ongoing loading of the .keter file. This leads to a call to the reload function, though the first action (added and modified respectively) was not finished. Moreover, the first action could be started when the .keter file was not fully loaded - in this case you can see the message looks like "2025-08-06 20:41:40.91|Keter.AppManager:259|Error> Error occured when launching bundle "py1": Codec.Compression.Zlib: premature end of compressed data stream".

The last line "Watched file unknown" is the signal unknownCloseWrite from FSN.watchTree. This is the real finish of file loading and keter has to start or reload application in this case only.

To demonstrate the problem deeper you can create a huge application. For example you can put some giant file into the .keter archive (~1GB). It will load for a while and you can see a huge amount of reloading and errors of decompression.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions