Open petersilva opened 4 years ago
This is a case that has occurred in the HPC mirroring use case. Clarification:
So how to have the file in progress marked to indicate the correct mtime when it will be complete. Options:
complications:
perhaps write a plugin that just consolidates multiple updates into a single one by delaying for only a few seconds. the plugin solution would be a lot easier to do with version 3 plugins, which deal with groups of messages, rather than individual ones.
discusse the delay/consolidation plugin with client. they seem ok with it in principle. the plugin needs to be applied to the winnow components.
Idea is a mini-cache ... lasting oh... 30 seconds or so.
for each file received, store in a python dictionary?
if you receive an updated version of the same file, replace the cache entry with the new one.
once the cache entry is > 30 seconds old, publish it.
make 30 seconds a programmable value.
For the HPC user case, this has to happen in the shovels, because there is no way to ensure a single subscriber will get all versions of the file. This may also solve the problem with the citypages. suppressing a lot of noise.
msg_suppress_excessive_writes
msg_suppress_excessive_write_timeout 30
when there is a race-condition and two processes are downloading... mtime will of the file will be current, so "later" file will be rejected as too old, even though the older mtime will be restored, once the file is completely written.