{"action":"opened","issue":{"url":"https://api.github.com/repos/strongloop/loopback/issues/1864","labels_url":"https://api.github.com/repos/strongloop/loopback/issues/1864/labels{/name}","comments_url":"https://api.github.com/repos/strongloop/loopback/issues/1864/comments","events_url":"https://api.github.com/repos/strongloop/loopback/issues/1864/events","html_url":"https://github.com/strongloop/loopback/issues/1864","id":120991520,"number":1864,"title":"Simplify Checkpoint implementation","user":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/strongloop/loopback/labels/%23tob","name":"#tob","color":"ededed"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/bug","name":"bug","color":"e11d21"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/major","name":"major","color":"eb6420"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/performance","name":"performance","color":"5319e7"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/replication","name":"replication","color":"5319e7"},{"url":"https://api.github.com/repos/strongloop/loopback/labels/support","name":"support","color":"3319E7"}],"state":"open","locked":false,"assignee":{"login":"bajtos","id":1140553,"avatar_url":"https://avatars.githubusercontent.com/u/1140553?v=3","gravatar_id":"","url":"https://api.github.com/users/bajtos","html_url":"https://github.com/bajtos","followers_url":"https://api.github.com/users/bajtos/followers","following_url":"https://api.github.com/users/bajtos/following{/other_user}","gists_url":"https://api.github.com/users/bajtos/gists{/gist_id}","starred_url":"https://api.github.com/users/bajtos/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bajtos/subscriptions","organizations_url":"https://api.github.com/users/bajtos/orgs","repos_url":"https://api.github.com/users/bajtos/repos","events_url":"https://api.github.com/users/bajtos/events{/privacy}","received_events_url":"https://api.github.com/users/bajtos/received_events","type":"User","site_admin":false},"milestone":null,"comments":0,"created_at":"2015-12-08T11:51:22Z","updated_at":"2015-12-08T11:51:22Z","closed_at":null,"body":"The current `Checkpoint` implementation keeps all past checkpoints around. When looking up the current checkpoint, we run the query `this.find({ limit: 1, order: 'seq DESC' })` which is not backed up by any index and thus triggers a full table scan.\r\n\r\nWe should rework the implementation to keep a single global `Checkpoint` instance and update it in-place when bumping up `seq`.\r\n\r\nRelated: strongloop-internal/scrum-cs#397"}}