{"action":"closed","issue":{"url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/256","repository_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat","labels_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/256/labels{/name}","comments_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/256/comments","events_url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/issues/256/events","html_url":"https://github.com/digitalmethodsinitiative/dmi-tcat/issues/256","id":214375163,"number":256,"title":"problem during DMI-TCAT TZ upgrade caused by missing LOCK TABLES access","user":{"login":"brendam","id":247237,"avatar_url":"https://avatars3.githubusercontent.com/u/247237?v=3","gravatar_id":"","url":"https://api.github.com/users/brendam","html_url":"https://github.com/brendam","followers_url":"https://api.github.com/users/brendam/followers","following_url":"https://api.github.com/users/brendam/following{/other_user}","gists_url":"https://api.github.com/users/brendam/gists{/gist_id}","starred_url":"https://api.github.com/users/brendam/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendam/subscriptions","organizations_url":"https://api.github.com/users/brendam/orgs","repos_url":"https://api.github.com/users/brendam/repos","events_url":"https://api.github.com/users/brendam/events{/privacy}","received_events_url":"https://api.github.com/users/brendam/received_events","type":"User","site_admin":false},"labels":[{"id":35320864,"url":"https://api.github.com/repos/digitalmethodsinitiative/dmi-tcat/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-03-15T12:33:54Z","updated_at":"2017-05-15T10:11:26Z","closed_at":"2017-05-15T10:11:26Z","body":"I've had a problem while upgrading an old server (`git parse HEAD 19b9d56498a08a876176b6765719425d4b8fda89`) .\r\n\r\nI've worked out now that it failed at line [762 of upgrade.php](https://github.com/digitalmethodsinitiative/dmi-tcat/blob/3c72eed1c1a5403d74bd686507ed16173e06b015/common/upgrade.php#L762) the dump step - because the tcat mysql user didn't have LOCK TABLES access and couldn't do the dump. I made it worse by trying the upgrade a second time and then a third time after fixing the lock problem (giving the tcat mysql user LOCK TABLES access).\r\n\r\nSo now the tweets before the upgrade are 20 hours behind where they should be - which is the 2 x -10 hours from `CONVERT_TZ(created_at, 'Australia/Brisbane', 'UTC')` Brisbane doesn't have daylight savings, so I think  I can fix that by running :\r\n\r\n```UPDATE binname_tweets SET created_at = DATE_SUB(created_at, INTERVAL 20 HOUR) where created_at < '2017-03-15 10:00:00'```\r\n\r\nfor each of the bins.\r\n\r\nBut I'm worried what other tables might then be wrong. Reading the upgrade script, it seems like `tcat_captured_phrases` is one that will also need fixing - could that also be fixed just by subtracting 20 hours?  But I'm not sure about the `tcat_error_ratelimit` and `tcat_error_gap` tables?\r\n\r\nI have the `tcat_error_ratelimit_and_gap_1489573269.sql.gz` file, which was made after the first two timezone updates (on the final successful run)\r\n\r\n2017-03-15 10:00:00 is before the new tweets with correct datetime start again - there is a 20 hour gap to pick a time inside.\r\n\r\nthanks,\r\n\r\nBrenda\r\n"}}
{"actor":{"display_login":"ErikBorra"}}