Interesting article! I might be wrong, but I think a race condition might occur with this solution. If the "actual" spooler is sending the message and postfixes the message it's sending with ".sending" and the error spooler starts up right at that second, it will send the message twice. Both the actual spooler as well as the error spooler will send the message.
I would propose adding a check for last file access time, to make sure a certain amount of time has passed before the error spooler kicks in. A period smaller than the recovery-timeout (5 minutes sounds about right). This gives the original spooler time to send the message and will avoid duplicate sending.
2 Comments
Interesting article! I might be wrong, but I think a race condition might occur with this solution. If the "actual" spooler is sending the message and postfixes the message it's sending with ".sending" and the error spooler starts up right at that second, it will send the message twice. Both the actual spooler as well as the error spooler will send the message.
I would propose adding a check for last file access time, to make sure a certain amount of time has passed before the error spooler kicks in. A period smaller than the recovery-timeout (5 minutes sounds about right). This gives the original spooler time to send the message and will avoid duplicate sending.
Cool suggestion :)
"Houston: no signs of life"
Start the conversation!