Ottomata has uploaded a new change for review.
https://gerrit.wikimedia.org/r/264126
Change subject: Order by timestamp instead of by uuid. UUID is an unordered
string anyway.
......................................................................
Order by timestamp instead of by uuid. UUID is an unordered string anyway.
Change-Id: Ib4e1e9833fa06d323c4daa5565fdd2d09723fe95
---
M files/mariadb/eventlogging_sync.sh
1 file changed, 1 insertion(+), 5 deletions(-)
git pull ssh://gerrit.wikimedia.org:29418/operations/puppet
refs/changes/26/264126/1
diff --git a/files/mariadb/eventlogging_sync.sh
b/files/mariadb/eventlogging_sync.sh
index 817a8be..8dc433f 100755
--- a/files/mariadb/eventlogging_sync.sh
+++ b/files/mariadb/eventlogging_sync.sh
@@ -58,11 +58,7 @@
# mysqldump has overhead with information_schema queries, so do a quick
check for a noop
if [ ! $($master $db -e "select ifnull(max(timestamp),0) from \`$table\`")
= $ts ]; then
echo -n " (rows!)"
- # ORDER BY 1 orders by the first field, which should be the PK.
- # Have to do this because we can't use --order-by-primary with a custom
- # LIMIT, and not all tables have the same field name as the id.
- # (I've seen uuid and id.)
- $dumpdata --insert-ignore --where="timestamp >= '$ts' ORDER BY 1 LIMIT
$batch_size" $db "$table" | $slave $db
+ $dumpdata --insert-ignore --where="timestamp >= '$ts' ORDER BY
timestamp LIMIT $batch_size" $db "$table" | $slave $db
#$dumpdata --insert-ignore --where="timestamp >= '$ts'" $db "$table"
>tmp/$table.sql
else
echo -n " (nothing)"
--
To view, visit https://gerrit.wikimedia.org/r/264126
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: Ib4e1e9833fa06d323c4daa5565fdd2d09723fe95
Gerrit-PatchSet: 1
Gerrit-Project: operations/puppet
Gerrit-Branch: production
Gerrit-Owner: Ottomata <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits