Merge ~wgrant/launchpad:preflight-10s into launchpad:master

Proposed by William Grant
Status: Merged
Approved by: William Grant
Approved revision: 6cd37df431e9e4204e9fba6a11e001f1fa8a65ed
Merge reported by: Otto Co-Pilot
Merged at revision: not available
Proposed branch: ~wgrant/launchpad:preflight-10s
Merge into: launchpad:master
Diff against target: 16 lines (+2/-2)
1 file modified
database/schema/preflight.py (+2/-2)
Reviewer Review Type Date Requested Status
Colin Watson (community) Approve
Review via email: mp+380708@code.launchpad.net

Commit message

Wait longer in preflight.py for connections to die

Description of the change

Despite the comment saying it could wait for 10s, it in fact only waited
for up to 2s. This has for some time not been reliably sufficient, as
a rerun of full-update has often been necessary.

To post a comment you must log in.
Revision history for this message
Colin Watson (cjwatson) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/database/schema/preflight.py b/database/schema/preflight.py
2index 6bf1abb..0a4053c 100755
3--- a/database/schema/preflight.py
4+++ b/database/schema/preflight.py
5@@ -337,9 +337,9 @@ class KillConnectionsPreflight(DatabasePreflight):
6
7 System users are defined by SYSTEM_USERS.
8 """
9- # We keep trying to terminate connections every 0.5 seconds for
10+ # We keep trying to terminate connections every 0.1 seconds for
11 # up to 10 seconds.
12- num_tries = 20
13+ num_tries = 100
14 seconds_to_pause = 0.1
15 if self.replication_paused:
16 nodes = set([self.lpmain_master_node])

Subscribers

People subscribed via source and target branches

to status/vote changes: