{"action":"created","issue":{"url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/53","labels_url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/53/labels{/name}","comments_url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/53/comments","events_url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/53/events","html_url":"https://github.com/dfahlander/Dexie.js/issues/53","id":51734020,"number":53,"title":"Resync problems","user":{"login":"martindiphoorn","id":917045,"avatar_url":"https://avatars.githubusercontent.com/u/917045?v=3","gravatar_id":"","url":"https://api.github.com/users/martindiphoorn","html_url":"https://github.com/martindiphoorn","followers_url":"https://api.github.com/users/martindiphoorn/followers","following_url":"https://api.github.com/users/martindiphoorn/following{/other_user}","gists_url":"https://api.github.com/users/martindiphoorn/gists{/gist_id}","starred_url":"https://api.github.com/users/martindiphoorn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/martindiphoorn/subscriptions","organizations_url":"https://api.github.com/users/martindiphoorn/orgs","repos_url":"https://api.github.com/users/martindiphoorn/repos","events_url":"https://api.github.com/users/martindiphoorn/events{/privacy}","received_events_url":"https://api.github.com/users/martindiphoorn/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-12-11T20:29:13Z","updated_at":"2015-01-15T21:12:49Z","closed_at":null,"body":"As you know i have created an resync option in the folowing steps:\r\n\r\n+ disconnect url\r\n+ remove the tables we want to resync\r\n+ delete url with: syncable.delete(url)\r\n+ connect url\r\n\r\nI have added an log line in every step to see that everything goes in the right order. And that goes  perfectly by using the promises of Dexie.\r\n\r\nHowever since the last release the changes table is not cleaned right. Remember that delete just all entries? The current code deletes all changes entries before _syncNode.myrevision:\r\n```\r\nreturn db._changes.where(\"rev\").below(oldestNode.myRevision).delete()\r\n```\r\nMy problem is that step 2 (Removing the tables) will have an higher revision number. So all the deletes will be send to the server when connecting again!\r\n\r\nThis is not always the case, so i think it goes together with the multiple synchronisation issue."},"comment":{"url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/comments/70162620","html_url":"https://github.com/dfahlander/Dexie.js/issues/53#issuecomment-70162620","issue_url":"https://api.github.com/repos/dfahlander/Dexie.js/issues/53","id":70162620,"user":{"login":"dfahlander","id":6791329,"avatar_url":"https://avatars.githubusercontent.com/u/6791329?v=3","gravatar_id":"","url":"https://api.github.com/users/dfahlander","html_url":"https://github.com/dfahlander","followers_url":"https://api.github.com/users/dfahlander/followers","following_url":"https://api.github.com/users/dfahlander/following{/other_user}","gists_url":"https://api.github.com/users/dfahlander/gists{/gist_id}","starred_url":"https://api.github.com/users/dfahlander/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dfahlander/subscriptions","organizations_url":"https://api.github.com/users/dfahlander/orgs","repos_url":"https://api.github.com/users/dfahlander/repos","events_url":"https://api.github.com/users/dfahlander/events{/privacy}","received_events_url":"https://api.github.com/users/dfahlander/received_events","type":"User","site_admin":false},"created_at":"2015-01-15T21:12:49Z","updated_at":"2015-01-15T21:12:49Z","body":"Martin, did we fix this issue or is it still open?"}}