{"action":"created","issue":{"url":"https://api.github.com/repos/pachyderm/pachyderm/issues/2904","repository_url":"https://api.github.com/repos/pachyderm/pachyderm","labels_url":"https://api.github.com/repos/pachyderm/pachyderm/issues/2904/labels{/name}","comments_url":"https://api.github.com/repos/pachyderm/pachyderm/issues/2904/comments","events_url":"https://api.github.com/repos/pachyderm/pachyderm/issues/2904/events","html_url":"https://github.com/pachyderm/pachyderm/issues/2904","id":322464866,"number":2904,"title":"Move from using etcd to a SQL DB (Cockroach DB?)","user":{"login":"gabrielgrant","id":493968,"avatar_url":"https://avatars2.githubusercontent.com/u/493968?v=4","gravatar_id":"","url":"https://api.github.com/users/gabrielgrant","html_url":"https://github.com/gabrielgrant","followers_url":"https://api.github.com/users/gabrielgrant/followers","following_url":"https://api.github.com/users/gabrielgrant/following{/other_user}","gists_url":"https://api.github.com/users/gabrielgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielgrant/subscriptions","organizations_url":"https://api.github.com/users/gabrielgrant/orgs","repos_url":"https://api.github.com/users/gabrielgrant/repos","events_url":"https://api.github.com/users/gabrielgrant/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielgrant/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-05-12T00:01:48Z","updated_at":"2018-05-12T00:42:50Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"This is obviously not a short-term goal, but my impression is there are a lot of places where pach code has additional complexity, because of using etcd rather than a SQL DB. I'm going to start collecting them here (rather than just talking with @msteffen about them)\r\n\r\n- multi-column indices -- sorting an individual collection by a secondary column requires an in-mem sort (eg. this came up recently with the open commit collection). This makes pagination difficult. If each collection were an individual table, this would be solved by an index\r\n- `DELETE CASCASE` -- @msteffen believes we are not properly cascading deletes of repos, for example, so if a given repo name is created again, some state (branches etc.?) will still be present and cause problems (points at non-existent commit)\r\n-..."},"comment":{"url":"https://api.github.com/repos/pachyderm/pachyderm/issues/comments/388517738","html_url":"https://github.com/pachyderm/pachyderm/issues/2904#issuecomment-388517738","issue_url":"https://api.github.com/repos/pachyderm/pachyderm/issues/2904","id":388517738,"user":{"login":"gabrielgrant","id":493968,"avatar_url":"https://avatars2.githubusercontent.com/u/493968?v=4","gravatar_id":"","url":"https://api.github.com/users/gabrielgrant","html_url":"https://github.com/gabrielgrant","followers_url":"https://api.github.com/users/gabrielgrant/followers","following_url":"https://api.github.com/users/gabrielgrant/following{/other_user}","gists_url":"https://api.github.com/users/gabrielgrant/gists{/gist_id}","starred_url":"https://api.github.com/users/gabrielgrant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gabrielgrant/subscriptions","organizations_url":"https://api.github.com/users/gabrielgrant/orgs","repos_url":"https://api.github.com/users/gabrielgrant/repos","events_url":"https://api.github.com/users/gabrielgrant/events{/privacy}","received_events_url":"https://api.github.com/users/gabrielgrant/received_events","type":"User","site_admin":false},"created_at":"2018-05-12T00:42:50Z","updated_at":"2018-05-12T00:42:50Z","author_association":"CONTRIBUTOR","body":"My understanding is that the standard way to \"watch\" in (postgre)SQL is either using  \r\n[`LISTEN`/`NOTIFY`](https://www.postgresql.org/docs/9.3/static/libpq-notify.html) or [triggers](https://www.postgresql.org/docs/10/static/sql-createtrigger.html), but AFAIU you're right that some notion of leases on keys would probably require client-side changes (unless you're just talking about something like `SELECT FOR UPDATE`?)\r\n\r\nRe: graph DBs -- probably a bit early to use this, but it looks pretty interesting: https://github.com/indradb/indradb"}}
{"actor":{"display_login":"gabrielgrant"}}