Elukey has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/365992 )
Change subject: eventlogging_cleaner: force a cast to char for the uuid field
......................................................................
eventlogging_cleaner: force a cast to char for the uuid field
For some unknown reason the analytics-store 'log' database lists
tables with the uuid field set to binary, rather than char as in
the eventlogging master and analytics-slave. Doing alter tables
is a demanding task for the current hardware so this change
introduces an explicit cast in the sql query as workaround to
get unblocked.
Change-Id: Idb7b3f1abc9e39e8b63c150f57daa1c18072ea7b
---
M modules/role/files/mariadb/eventlogging_cleaner.py
1 file changed, 7 insertions(+), 1 deletion(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/92/365992/1
diff --git a/modules/role/files/mariadb/eventlogging_cleaner.py
b/modules/role/files/mariadb/eventlogging_cleaner.py
index 634a74f..ee08333 100644
--- a/modules/role/files/mariadb/eventlogging_cleaner.py
+++ b/modules/role/files/mariadb/eventlogging_cleaner.py
@@ -236,8 +236,14 @@
re-purge some events, which is OK, because the outcome does not change.
"""
batch_size = override_batch_size or self.batch_size
+ # July 2017
+ # There are currently some tables on analtics-store that have their
uuid
+ # field set as 'binary', not 'char' as in the master
+ # and the analytics-slave.
+ # Since altering all the inconsistent tables is a demanding task for
the
+ # current hardware, we just force an explicit cast to char in the
query.
command = (
- "SELECT timestamp, uuid from {} WHERE timestamp >= %(start_ts)s "
+ "SELECT timestamp, CAST(uuid AS CHAR) from {} WHERE timestamp >=
%(start_ts)s "
"AND timestamp < %(end_ts)s ORDER BY timestamp LIMIT
%(batch_size)s"
.format(table)
)
--
To view, visit https://gerrit.wikimedia.org/r/365992
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Idb7b3f1abc9e39e8b63c150f57daa1c18072ea7b
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Elukey <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits