Avoid redundant COMMIT calls on page views
authorAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Sep 2016 16:07:01 +0000 (09:07 -0700)
committerAaron Schulz <aschulz@wikimedia.org>
Wed, 7 Sep 2016 17:48:42 +0000 (17:48 +0000)
commitb9b0a6b0784859a9b25e35b0c59095792b3369c0
treeae0df9165251d964b8ee43b433da830e82813541
parentdc178bf8f6b768919464f52905fc0d42d17fc3fe
Avoid redundant COMMIT calls on page views

These just clear empty transactions and do not do anything
otherwise. No need in doing a few extra RTTs for that.

This also avoids "could not COMMIT" errors when transaction
callbacks do silly things like add more callbacks to outside
DBs. In that case, they either ran their callbacks already or
calling clearSnapshot() will error out.

Change-Id: I4d52c4ef69b02a33adffd8892b98ad1bd5c7d6dc
includes/db/loadbalancer/LoadBalancer.php