{"action":"created","issue":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2272","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2272/labels{/name}","comments_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2272/comments","events_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2272/events","html_url":"https://github.com/cockroachdb/cockroach/issues/2272","id":103332325,"number":2272,"title":"Split tables into their own ranges.","user":{"login":"MBerhault","id":5901480,"avatar_url":"https://avatars.githubusercontent.com/u/5901480?v=3","gravatar_id":"","url":"https://api.github.com/users/MBerhault","html_url":"https://github.com/MBerhault","followers_url":"https://api.github.com/users/MBerhault/followers","following_url":"https://api.github.com/users/MBerhault/following{/other_user}","gists_url":"https://api.github.com/users/MBerhault/gists{/gist_id}","starred_url":"https://api.github.com/users/MBerhault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MBerhault/subscriptions","organizations_url":"https://api.github.com/users/MBerhault/orgs","repos_url":"https://api.github.com/users/MBerhault/repos","events_url":"https://api.github.com/users/MBerhault/events{/privacy}","received_events_url":"https://api.github.com/users/MBerhault/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"MBerhault","id":5901480,"avatar_url":"https://avatars.githubusercontent.com/u/5901480?v=3","gravatar_id":"","url":"https://api.github.com/users/MBerhault","html_url":"https://github.com/MBerhault","followers_url":"https://api.github.com/users/MBerhault/followers","following_url":"https://api.github.com/users/MBerhault/following{/other_user}","gists_url":"https://api.github.com/users/MBerhault/gists{/gist_id}","starred_url":"https://api.github.com/users/MBerhault/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MBerhault/subscriptions","organizations_url":"https://api.github.com/users/MBerhault/orgs","repos_url":"https://api.github.com/users/MBerhault/repos","events_url":"https://api.github.com/users/MBerhault/events{/privacy}","received_events_url":"https://api.github.com/users/MBerhault/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1","html_url":"https://github.com/cockroachdb/cockroach/milestones/Beta","labels_url":"https://api.github.com/repos/cockroachdb/cockroach/milestones/1/labels","id":778698,"number":1,"title":"Beta","description":"","creator":{"login":"andybons","id":365204,"avatar_url":"https://avatars.githubusercontent.com/u/365204?v=3","gravatar_id":"","url":"https://api.github.com/users/andybons","html_url":"https://github.com/andybons","followers_url":"https://api.github.com/users/andybons/followers","following_url":"https://api.github.com/users/andybons/following{/other_user}","gists_url":"https://api.github.com/users/andybons/gists{/gist_id}","starred_url":"https://api.github.com/users/andybons/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/andybons/subscriptions","organizations_url":"https://api.github.com/users/andybons/orgs","repos_url":"https://api.github.com/users/andybons/repos","events_url":"https://api.github.com/users/andybons/events{/privacy}","received_events_url":"https://api.github.com/users/andybons/received_events","type":"User","site_admin":false},"open_issues":33,"closed_issues":38,"state":"open","created_at":"2014-09-04T16:42:18Z","updated_at":"2015-08-26T18:06:59Z","due_on":null,"closed_at":null},"comments":3,"created_at":"2015-08-26T18:06:55Z","updated_at":"2015-08-26T19:19:10Z","closed_at":null,"body":"Multiple reasons:\r\n* need to gossip the system tables\r\n* zone configs will be applied per table. sequential tables with the same zoning could avoid splits, but that seems like an unnecessary complication: #2090 \r\n* accounting will be made easier (not critical)\r\n\r\nWe can either create a sentinel value when creating a table and split at `CREATE` time, or we can delay the split until the first write.\r\nThis would effectively create a range for each: `<tableprefix>/<tableid>`"},"comment":{"url":"https://api.github.com/repos/cockroachdb/cockroach/issues/comments/135144604","html_url":"https://github.com/cockroachdb/cockroach/issues/2272#issuecomment-135144604","issue_url":"https://api.github.com/repos/cockroachdb/cockroach/issues/2272","id":135144604,"user":{"login":"spencerkimball","id":6147149,"avatar_url":"https://avatars.githubusercontent.com/u/6147149?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerkimball","html_url":"https://github.com/spencerkimball","followers_url":"https://api.github.com/users/spencerkimball/followers","following_url":"https://api.github.com/users/spencerkimball/following{/other_user}","gists_url":"https://api.github.com/users/spencerkimball/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerkimball/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerkimball/subscriptions","organizations_url":"https://api.github.com/users/spencerkimball/orgs","repos_url":"https://api.github.com/users/spencerkimball/repos","events_url":"https://api.github.com/users/spencerkimball/events{/privacy}","received_events_url":"https://api.github.com/users/spencerkimball/received_events","type":"User","site_admin":false},"created_at":"2015-08-26T19:19:10Z","updated_at":"2015-08-26T19:19:10Z","body":"There's no reason zero-width splits won't work, short of fixable bugs. Let's split as soon as a table is created; no sense in adding complexity with a sentinel. We'll also want splits at bootstrap for each system table.\r\n\r\nSo, at bootstrap let's say we have system tables for users and databases. We'd split the key space immediate at <users-start> and <dbs-start>. This basically means we end up with three ranges: KeyMin -> <users-start>, <users-start> -> <dbs-start>, <dbs-start> -> KeyMax.\r\n\r\nIf adding table T1, we'd split again at <T1-start>. "}}