P4DTI issue job000367

TitleStopping using the startup script can cause inconsistencies
Assigned userNick Barnes
DescriptionFor the Bugzilla integration on Linux, we provide a startup script for /etc/rc.d/init.d. This provides start, stop, and restart (stop then start) operations. Under some rare circumstances, the stop and restart operations may leave the Bugzilla database in an inconsistent state (see job000366).
AnalysisCurrently we stop the replicator by sending it a signal. This signal is not caught by the replicator, which simply exits. As job000366 and job000046 note, this can cause inconsistencies.
We should use some better mechanism to tell the replicator to stop. Convention for servers is SIGINT to stop, SIGHUP to restart.
The replicator could handle these signals and behave accordingly, but note (1) it is not possible to mask signals in Python, so the natural implementation (mask during a poll, handle between polls) is not possible, (2) some library calls may raise exceptions such as IOError if a signal is handled during their execution; we would have to modify various code in the replicator to handle these exceptions.
How foundinspection
EvidenceThinking about Perforce job 6101: <http://info.ravenbrook.com/mail/2001/07/19/20-57-01/0.txt>
Observed in1.1.1
Introduced in1.0.0
Created byNick Barnes
Created on2001-07-20 13:59:01
Last modified byNick Barnes
Last modified on2018-07-05 17:27:44
History2001-07-20 NB Created.
       2018-07-05 NB Suspended because the P4DTI is obsolete.