{"action":"created","issue":{"url":"https://api.github.com/repos/palantir/atlasdb/issues/1400","repository_url":"https://api.github.com/repos/palantir/atlasdb","labels_url":"https://api.github.com/repos/palantir/atlasdb/issues/1400/labels{/name}","comments_url":"https://api.github.com/repos/palantir/atlasdb/issues/1400/comments","events_url":"https://api.github.com/repos/palantir/atlasdb/issues/1400/events","html_url":"https://github.com/palantir/atlasdb/pull/1400","id":198771967,"number":1400,"title":"Feature/backup lock instrumentation","user":{"login":"gsheasby","id":15610492,"avatar_url":"https://avatars.githubusercontent.com/u/15610492?v=3","gravatar_id":"","url":"https://api.github.com/users/gsheasby","html_url":"https://github.com/gsheasby","followers_url":"https://api.github.com/users/gsheasby/followers","following_url":"https://api.github.com/users/gsheasby/following{/other_user}","gists_url":"https://api.github.com/users/gsheasby/gists{/gist_id}","starred_url":"https://api.github.com/users/gsheasby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsheasby/subscriptions","organizations_url":"https://api.github.com/users/gsheasby/orgs","repos_url":"https://api.github.com/users/gsheasby/repos","events_url":"https://api.github.com/users/gsheasby/events{/privacy}","received_events_url":"https://api.github.com/users/gsheasby/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"jboreiko","id":837571,"avatar_url":"https://avatars.githubusercontent.com/u/837571?v=3","gravatar_id":"","url":"https://api.github.com/users/jboreiko","html_url":"https://github.com/jboreiko","followers_url":"https://api.github.com/users/jboreiko/followers","following_url":"https://api.github.com/users/jboreiko/following{/other_user}","gists_url":"https://api.github.com/users/jboreiko/gists{/gist_id}","starred_url":"https://api.github.com/users/jboreiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboreiko/subscriptions","organizations_url":"https://api.github.com/users/jboreiko/orgs","repos_url":"https://api.github.com/users/jboreiko/repos","events_url":"https://api.github.com/users/jboreiko/events{/privacy}","received_events_url":"https://api.github.com/users/jboreiko/received_events","type":"User","site_admin":false},"assignees":[{"login":"jboreiko","id":837571,"avatar_url":"https://avatars.githubusercontent.com/u/837571?v=3","gravatar_id":"","url":"https://api.github.com/users/jboreiko","html_url":"https://github.com/jboreiko","followers_url":"https://api.github.com/users/jboreiko/followers","following_url":"https://api.github.com/users/jboreiko/following{/other_user}","gists_url":"https://api.github.com/users/jboreiko/gists{/gist_id}","starred_url":"https://api.github.com/users/jboreiko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jboreiko/subscriptions","organizations_url":"https://api.github.com/users/jboreiko/orgs","repos_url":"https://api.github.com/users/jboreiko/repos","events_url":"https://api.github.com/users/jboreiko/events{/privacy}","received_events_url":"https://api.github.com/users/jboreiko/received_events","type":"User","site_admin":false},{"login":"hsaraogi","id":20421615,"avatar_url":"https://avatars.githubusercontent.com/u/20421615?v=3","gravatar_id":"","url":"https://api.github.com/users/hsaraogi","html_url":"https://github.com/hsaraogi","followers_url":"https://api.github.com/users/hsaraogi/followers","following_url":"https://api.github.com/users/hsaraogi/following{/other_user}","gists_url":"https://api.github.com/users/hsaraogi/gists{/gist_id}","starred_url":"https://api.github.com/users/hsaraogi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hsaraogi/subscriptions","organizations_url":"https://api.github.com/users/hsaraogi/orgs","repos_url":"https://api.github.com/users/hsaraogi/repos","events_url":"https://api.github.com/users/hsaraogi/events{/privacy}","received_events_url":"https://api.github.com/users/hsaraogi/received_events","type":"User","site_admin":false}],"milestone":null,"comments":2,"created_at":"2017-01-04T18:02:59Z","updated_at":"2017-01-05T15:46:03Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/palantir/atlasdb/pulls/1400","html_url":"https://github.com/palantir/atlasdb/pull/1400","diff_url":"https://github.com/palantir/atlasdb/pull/1400.diff","patch_url":"https://github.com/palantir/atlasdb/pull/1400.patch"},"body":"This lays the foundations for the backup lock, in particular the persistent locks store.\r\n\r\nThe naming might be slightly off; it implies the support of multiple kind of persistent lock, whereas we actually only have the DeletionLock.\r\n\r\nTo avoid adding a CAS method to the KVS API, I'm using `putUnlessExists` for acquiring locks, and `delete` for removing locks.\r\n\r\nNo release notes - this instrumentation isn't actually used anywhere yet, and will not be until the next PR (backup lock CLI).\n\n<!-- Reviewable:start -->\n---\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/palantir/atlasdb/1400)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/palantir/atlasdb/issues/comments/270675641","html_url":"https://github.com/palantir/atlasdb/pull/1400#issuecomment-270675641","issue_url":"https://api.github.com/repos/palantir/atlasdb/issues/1400","id":270675641,"user":{"login":"gsheasby","id":15610492,"avatar_url":"https://avatars.githubusercontent.com/u/15610492?v=3","gravatar_id":"","url":"https://api.github.com/users/gsheasby","html_url":"https://github.com/gsheasby","followers_url":"https://api.github.com/users/gsheasby/followers","following_url":"https://api.github.com/users/gsheasby/following{/other_user}","gists_url":"https://api.github.com/users/gsheasby/gists{/gist_id}","starred_url":"https://api.github.com/users/gsheasby/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gsheasby/subscriptions","organizations_url":"https://api.github.com/users/gsheasby/orgs","repos_url":"https://api.github.com/users/gsheasby/repos","events_url":"https://api.github.com/users/gsheasby/events{/privacy}","received_events_url":"https://api.github.com/users/gsheasby/received_events","type":"User","site_admin":false},"created_at":"2017-01-05T15:46:03Z","updated_at":"2017-01-05T15:46:03Z","body":"Thanks for the thorough comment, @tpetracca.\r\n\r\nBased on this, I see two ways to improve this:\r\nA. Retain the \"PUE to acquire, delete to release\" model, but restrict it to one cell (e.g. by concatenating \"reason\" and \"lock ID\"). If necessary, add a special snowflake for Cassandra KVS that uses client.cas.\r\n\r\nB. Implement KVS.checkAndSet\r\n\r\nI'm going to start on B (in a separate PR), because A seems slightly convoluted and might not even work. Will have to implement CAS for all supported KVSs (plus probably RocksDB and JDBC) so that we can still support backup and sweep regardless of the KVS used."}}
{"actor":{"display_login":"gsheasby"}}