Open jldec opened 1 month ago
assigning @jan.johannes (suspected lix file watch issue)
repro in https://github.com/opral/monorepo/pull/2758
@jldec closing as behaves as expected. rename is not part of the lix fs api and known to cause plenty of issues in existing nodejs watch module as well. this cannot really be fixed until lix.fs implementation.
MESDK-91
In order to make updates more atomic, I tried to implement a pattern of writing a JSON structure to a temp file and then renaming that to replace the original message file.
It appears that the watcher on the original message file stops reacting to changes on the message file after the rename
(modifled code is in https://github.com/opral/monorepo/pull/2758)
Context
generateMessageFile()
in the sdk load-test.ts to write messages into temp.json, and then call fs.rename to rename it to messages.json. (This is useful to avoid partial writes)pnpm test 100 0 1 0 1
The translated changes to messages.json are not picked up by the watching process.