Rush has submitted this change and it was merged. ( 
https://gerrit.wikimedia.org/r/391586 )

Change subject: maintain-views: implement connection timeouts for views creation
......................................................................


maintain-views: implement connection timeouts for views creation

There are reports that indicates that views management can cause problems
if they don't use a sensible timeout.

As recommended by WMF DBAs, implement some connection timeouts.

Bug: T180564
Change-Id: Ie31ab1ec63059167e2ad8ddf8e91b6599aa88f89
Suggested-By: Jaime Crespo <[email protected]>
Signed-off-by: Arturo Borrero Gonzalez <[email protected]>
---
M modules/role/files/labs/db/views/maintain-views.py
1 file changed, 3 insertions(+), 0 deletions(-)

Approvals:
  Rush: Verified; Looks good to me, approved
  jenkins-bot: Verified
  Jcrespo: Looks good to me, but someone else must approve



diff --git a/modules/role/files/labs/db/views/maintain-views.py 
b/modules/role/files/labs/db/views/maintain-views.py
index a1c9f73..23a7dc9 100644
--- a/modules/role/files/labs/db/views/maintain-views.py
+++ b/modules/role/files/labs/db/views/maintain-views.py
@@ -435,6 +435,9 @@
 
     with dbh.cursor() as cursor:
         cursor.execute("SET NAMES 'utf8';")
+        cursor.execute("SET SESSION innodb_lock_wait_timeout=1;")
+        cursor.execute("SET SESSION lock_wait_timeout=60;")
+
         for db, db_info in dbs_with_metadata.items():
             ops = SchemaOperations(args.dry_run,
                                    args.replace_all,

-- 
To view, visit https://gerrit.wikimedia.org/r/391586
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: Ie31ab1ec63059167e2ad8ddf8e91b6599aa88f89
Gerrit-PatchSet: 3
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Arturo Borrero Gonzalez <[email protected]>
Gerrit-Reviewer: Giuseppe Lavagetto <[email protected]>
Gerrit-Reviewer: Jcrespo <[email protected]>
Gerrit-Reviewer: Rush <[email protected]>
Gerrit-Reviewer: Volans <[email protected]>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to