Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(14)

Side by Side Diff: third_party/buildbot_8_4p1/buildbot/db/pool.py

Issue 2124383002: Revert of Cherry pick buildbot cda35a4edcc822b0169412e2ad17c75973050807: (Closed) Base URL: https://chromium.googlesource.com/chromium/tools/build.git@buildbot-version-1
Patch Set: Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # This file is part of Buildbot. Buildbot is free software: you can 1 # This file is part of Buildbot. Buildbot is free software: you can
2 # redistribute it and/or modify it under the terms of the GNU General Public 2 # redistribute it and/or modify it under the terms of the GNU General Public
3 # License as published by the Free Software Foundation, version 2. 3 # License as published by the Free Software Foundation, version 2.
4 # 4 #
5 # This program is distributed in the hope that it will be useful, but WITHOUT 5 # This program is distributed in the hope that it will be useful, but WITHOUT
6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS 6 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more 7 # FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
8 # details. 8 # details.
9 # 9 #
10 # You should have received a copy of the GNU General Public License along with 10 # You should have received a copy of the GNU General Public License along with
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
47 maxthreads=pool_size, 47 maxthreads=pool_size,
48 name='DBThreadPool') 48 name='DBThreadPool')
49 self.engine = engine 49 self.engine = engine
50 if engine.dialect.name == 'sqlite': 50 if engine.dialect.name == 'sqlite':
51 vers = self.get_sqlite_version() 51 vers = self.get_sqlite_version()
52 log.msg("Using SQLite Version %s" % (vers,)) 52 log.msg("Using SQLite Version %s" % (vers,))
53 if vers < (3,7): 53 if vers < (3,7):
54 log.msg("NOTE: this old version of SQLite does not support " 54 log.msg("NOTE: this old version of SQLite does not support "
55 "WAL journal mode; a busy master may encounter " 55 "WAL journal mode; a busy master may encounter "
56 "'Database is locked' errors. Consider upgrading.") 56 "'Database is locked' errors. Consider upgrading.")
57 if vers < (3,4): 57 if vers < (3,3,17):
58 log.msg("NOTE: this old version of SQLite is not supported. " 58 log.msg("NOTE: this old version of SQLite does not support "
59 "It fails for multiple simultaneous accesses to the " 59 "multiple simultaneous accesses to the database; "
60 "database: try adding the 'pool_size=1' argument to " 60 "add the 'pool_size=1' argument to your db url")
61 "your db url. ")
62 brkn = self.__broken_sqlite = self.detect_bug1810() 61 brkn = self.__broken_sqlite = self.detect_bug1810()
63 if brkn: 62 if brkn:
64 log.msg("Applying SQLite workaround from Buildbot bug #1810") 63 log.msg("Applying SQLite workaround from Buildbot bug #1810")
65 self._start_evt = reactor.callWhenRunning(self._start) 64 self._start_evt = reactor.callWhenRunning(self._start)
66 65
67 def _start(self): 66 def _start(self):
68 self._start_evt = None 67 self._start_evt = None
69 if not self.running: 68 if not self.running:
70 self.start() 69 self.start()
71 self._stop_evt = reactor.addSystemEventTrigger( 70 self._stop_evt = reactor.addSystemEventTrigger(
(...skipping 131 matching lines...) Expand 10 before | Expand all | Expand 10 after
203 except: 202 except:
204 return (0,) 203 return (0,)
205 204
206 if vers_row: 205 if vers_row:
207 try: 206 try:
208 return tuple(map(int, vers_row[0].split('.'))) 207 return tuple(map(int, vers_row[0].split('.')))
209 except (TypeError, ValueError): 208 except (TypeError, ValueError):
210 return (0,) 209 return (0,)
211 else: 210 else:
212 return (0,) 211 return (0,)
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698