{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8443","repository_url":"https://api.github.com/repos/cockroachdb/cockroach","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8443/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8443/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8443/events","html_url":"https://github.com/cockroachdb/cockroach/pull/8443","id":170452339,"number":8443,"title":"sql: simple backup/restore commands","user":{"login":"paperstreet","id":52528,"avatar_url":"https://avatars.githubusercontent.com/u/52528?v=3","gravatar_id":"","url":"https://api.github.com/users/paperstreet","html_url":"https://github.com/paperstreet","followers_url":"https://api.github.com/users/paperstreet/followers","following_url":"https://api.github.com/users/paperstreet/following{/other_user}","gists_url":"https://api.github.com/users/paperstreet/gists{/gist_id}","starred_url":"https://api.github.com/users/paperstreet/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paperstreet/subscriptions","organizations_url":"https://api.github.com/users/paperstreet/orgs","repos_url":"https://api.github.com/users/paperstreet/repos","events_url":"https://api.github.com/users/paperstreet/events{/privacy}","received_events_url":"https://api.github.com/users/paperstreet/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"dt","id":15615,"avatar_url":"https://avatars.githubusercontent.com/u/15615?v=3","gravatar_id":"","url":"https://api.github.com/users/dt","html_url":"https://github.com/dt","followers_url":"https://api.github.com/users/dt/followers","following_url":"https://api.github.com/users/dt/following{/other_user}","gists_url":"https://api.github.com/users/dt/gists{/gist_id}","starred_url":"https://api.github.com/users/dt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dt/subscriptions","organizations_url":"https://api.github.com/users/dt/orgs","repos_url":"https://api.github.com/users/dt/repos","events_url":"https://api.github.com/users/dt/events{/privacy}","received_events_url":"https://api.github.com/users/dt/received_events","type":"User","site_admin":false},"assignees":[{"login":"dt","id":15615,"avatar_url":"https://avatars.githubusercontent.com/u/15615?v=3","gravatar_id":"","url":"https://api.github.com/users/dt","html_url":"https://github.com/dt","followers_url":"https://api.github.com/users/dt/followers","following_url":"https://api.github.com/users/dt/following{/other_user}","gists_url":"https://api.github.com/users/dt/gists{/gist_id}","starred_url":"https://api.github.com/users/dt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dt/subscriptions","organizations_url":"https://api.github.com/users/dt/orgs","repos_url":"https://api.github.com/users/dt/repos","events_url":"https://api.github.com/users/dt/events{/privacy}","received_events_url":"https://api.github.com/users/dt/received_events","type":"User","site_admin":false},{"login":"mjibson","id":41181,"avatar_url":"https://avatars.githubusercontent.com/u/41181?v=3","gravatar_id":"","url":"https://api.github.com/users/mjibson","html_url":"https://github.com/mjibson","followers_url":"https://api.github.com/users/mjibson/followers","following_url":"https://api.github.com/users/mjibson/following{/other_user}","gists_url":"https://api.github.com/users/mjibson/gists{/gist_id}","starred_url":"https://api.github.com/users/mjibson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mjibson/subscriptions","organizations_url":"https://api.github.com/users/mjibson/orgs","repos_url":"https://api.github.com/users/mjibson/repos","events_url":"https://api.github.com/users/mjibson/events{/privacy}","received_events_url":"https://api.github.com/users/mjibson/received_events","type":"User","site_admin":false}],"milestone":null,"comments":14,"created_at":"2016-08-10T15:52:39Z","updated_at":"2016-08-11T17:24:28Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/cockroachdb/cockroach/pulls/8443","html_url":"https://github.com/cockroachdb/cockroach/pull/8443","diff_url":"https://github.com/cockroachdb/cockroach/pull/8443.diff","patch_url":"https://github.com/cockroachdb/cockroach/pull/8443.patch"},"body":"As an aide for further investigations, this implements backup to and restore\r\nfrom the file format that's expected to be used in the final version:\r\n\r\n- /<base>/<timestamp>/<node_id>/<key_range>/data.sst\r\n- <base> is given by the user and is expected to eventually be cloud storage\r\n- The <key_range>s are non-overlapping.\r\n- Metadata (including checksums and a mapping between key ranges and full\r\n  paths) will be added at the same level as <node_id>.\r\n\r\nThis implementation is slow but correct (or mostly correct). Most future work\r\nwill focus on speed, but there is some additional correctness work:\r\n- Support incremental backup/restore\r\n- Support various cloud storages\r\n- Resolve intents during backup\r\n- Tighter bound on the end timestamp\r\n- Support time travel queries on restored data\r\n- Etc.\r\n\r\nInitial results of the benchmarks on my laptop:\r\n\r\nname            time/op\r\nBackup_1-8      4.95ms ± 1%\r\nBackup_1000-8   8.48ms ± 3%\r\nRestore_1-8     8.62ms ±34%\r\nRestore_1000-8   455ms ± 1%\r\n\r\nname            alloc/op\r\nBackup_1-8       275kB ± 0%\r\nBackup_1000-8    847kB ± 0%\r\nRestore_1-8      287kB ± 0%\r\nRestore_1000-8  44.2MB ± 0%\r\n\r\nname            allocs/op\r\nBackup_1-8       2.07k ± 0%\r\nBackup_1000-8    2.09k ± 0%\r\nRestore_1-8      2.84k ± 0%\r\nRestore_1000-8    491k ± 0%\r\n\r\nFor #8191.\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/cockroachdb/cockroach/8443)\n<!-- Reviewable:end -->\n"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/239230235","html_url":"https://github.com/cockroachdb/cockroach/pull/8443#issuecomment-239230235","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/8443","id":239230235,"user":{"login":"tamird","id":1535036,"avatar_url":"https://avatars.githubusercontent.com/u/1535036?v=3","gravatar_id":"","url":"https://api.github.com/users/tamird","html_url":"https://github.com/tamird","followers_url":"https://api.github.com/users/tamird/followers","following_url":"https://api.github.com/users/tamird/following{/other_user}","gists_url":"https://api.github.com/users/tamird/gists{/gist_id}","starred_url":"https://api.github.com/users/tamird/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tamird/subscriptions","organizations_url":"https://api.github.com/users/tamird/orgs","repos_url":"https://api.github.com/users/tamird/repos","events_url":"https://api.github.com/users/tamird/events{/privacy}","received_events_url":"https://api.github.com/users/tamird/received_events","type":"User","site_admin":false},"created_at":"2016-08-11T17:24:28Z","updated_at":"2016-08-11T17:24:28Z","body":"\n\n\n\nReviewed 1 of 1 files at r6.\nReview status: 5 of 10 files reviewed at latest revision, 18 unresolved discussions, some commit checks pending.\n\n---\n\n*[sql/backup.go, line 64 \\[r6\\]](https://reviewable.io:443/reviews/cockroachdb/cockroach/8443#-KOucOnu7vmJQd4nCwsv:-KOucOnvZUXNC50ngrkP:bmsfuk6) ([raw file](https://github.com/cockroachdb/cockroach/blob/74ea4047027740de4c797750f06b6f181d53361d/sql/backup.go#L64)):*\n> ```Go\n> //\n> // TODO(dan): Bikeshed this directory structure and naming.\n> func Backup(ctx context.Context, db client.DB, base string) (retErr error) {\n> ```\n\nby convention: we usually try to keep this name `err`, though I agree it's awkward given how you're using it.\n\n---\n\n\n*Comments from [Reviewable](https://reviewable.io:443/reviews/cockroachdb/cockroach/8443)*\n<!-- Sent from Reviewable.io -->\n"}}
{"actor":{"display_login":"tamird"}}