{"action":"created","issue":{"url":"https://api.github.com/repos/Armarr/Autorank-2/issues/230","labels_url":"https://api.github.com/repos/Armarr/Autorank-2/issues/230/labels{/name}","comments_url":"https://api.github.com/repos/Armarr/Autorank-2/issues/230/comments","events_url":"https://api.github.com/repos/Armarr/Autorank-2/issues/230/events","html_url":"https://github.com/Armarr/Autorank-2/issues/230","id":88071398,"number":230,"title":"Times being reset/lost","user":{"login":"rendezvousIY","id":6607975,"avatar_url":"https://avatars.githubusercontent.com/u/6607975?v=3","gravatar_id":"","url":"https://api.github.com/users/rendezvousIY","html_url":"https://github.com/rendezvousIY","followers_url":"https://api.github.com/users/rendezvousIY/followers","following_url":"https://api.github.com/users/rendezvousIY/following{/other_user}","gists_url":"https://api.github.com/users/rendezvousIY/gists{/gist_id}","starred_url":"https://api.github.com/users/rendezvousIY/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rendezvousIY/subscriptions","organizations_url":"https://api.github.com/users/rendezvousIY/orgs","repos_url":"https://api.github.com/users/rendezvousIY/repos","events_url":"https://api.github.com/users/rendezvousIY/events{/privacy}","received_events_url":"https://api.github.com/users/rendezvousIY/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-13T21:52:44Z","updated_at":"2015-06-14T12:21:36Z","closed_at":null,"body":"I've been trying to identify exactly what is causing it, but it seems that some or all players are having their times partially reset in what feels like some sort of race condition. Regardless of whether or not player time is naturally accrued or manually added via DB (and each server reloaded to be sure) players are still losing time, going to global levels lower than what the users have accrued on individual servers. I'm unable to identify what determines the remaining time, but have seen it happen at least once every couple of days for one or multiple users.\r\n\r\nOne suspicion I had was that (https://github.com/Armarr/Autorank-2/issues/229) my database was being locked up or was inaccessible (it's running on a separate server but has good connectivity) and that the issue could happen if AR was attempting to pull global time, add it to current playtime, and then update the DB. *if* AR couldn't access the DB and assumed 0 for global time, then wrote that into the DB the next time it was able to access it.\r\n\r\nIf anything, while this wouldn't necessarily fix the issue, but doing an update once per minute as follows shouldn't have any conflict with database connectivity: \r\nUPDATE autorank SET time=time+1 WHERE uuid IN ('uuid1', 'uuid2', 'uuid3');\r\n\r\nAdditionally, storing accrued time locally in the case of DB issues could avoid this type of issue.\r\n\r\nThanks!"},"comment":{"url":"https://api.github.com/repos/Armarr/Autorank-2/issues/comments/111821753","html_url":"https://github.com/Armarr/Autorank-2/issues/230#issuecomment-111821753","issue_url":"https://api.github.com/repos/Armarr/Autorank-2/issues/230","id":111821753,"user":{"login":"Staartvin","id":1338071,"avatar_url":"https://avatars.githubusercontent.com/u/1338071?v=3","gravatar_id":"","url":"https://api.github.com/users/Staartvin","html_url":"https://github.com/Staartvin","followers_url":"https://api.github.com/users/Staartvin/followers","following_url":"https://api.github.com/users/Staartvin/following{/other_user}","gists_url":"https://api.github.com/users/Staartvin/gists{/gist_id}","starred_url":"https://api.github.com/users/Staartvin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Staartvin/subscriptions","organizations_url":"https://api.github.com/users/Staartvin/orgs","repos_url":"https://api.github.com/users/Staartvin/repos","events_url":"https://api.github.com/users/Staartvin/events{/privacy}","received_events_url":"https://api.github.com/users/Staartvin/received_events","type":"User","site_admin":false},"created_at":"2015-06-14T12:21:36Z","updated_at":"2015-06-14T12:21:36Z","body":"If you wanna alter the code yourself, you're going to have to download an IDE. You'll need to fork this project, pull it to your IDE and alter the code. You'll be able to 'export' your code from the IDE to a .jar file which you can run on your own server."}}