{"action":"opened","number":1940,"pull_request":{"url":"https://api.github.com/repos/youtube/vitess/pulls/1940","id":81195439,"html_url":"https://github.com/youtube/vitess/pull/1940","diff_url":"https://github.com/youtube/vitess/pull/1940.diff","patch_url":"https://github.com/youtube/vitess/pull/1940.patch","issue_url":"https://api.github.com/repos/youtube/vitess/issues/1940","number":1940,"state":"open","locked":false,"title":"Introduce _vt.shard_metadata table.","user":{"login":"pivanof","id":5752651,"avatar_url":"https://avatars.githubusercontent.com/u/5752651?v=3","gravatar_id":"","url":"https://api.github.com/users/pivanof","html_url":"https://github.com/pivanof","followers_url":"https://api.github.com/users/pivanof/followers","following_url":"https://api.github.com/users/pivanof/following{/other_user}","gists_url":"https://api.github.com/users/pivanof/gists{/gist_id}","starred_url":"https://api.github.com/users/pivanof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivanof/subscriptions","organizations_url":"https://api.github.com/users/pivanof/orgs","repos_url":"https://api.github.com/users/pivanof/repos","events_url":"https://api.github.com/users/pivanof/events{/privacy}","received_events_url":"https://api.github.com/users/pivanof/received_events","type":"User","site_admin":false},"body":"This table will contain a per-shard metadata information similarly to how\r\n_vt.local_metadata contains local per-tablet metadata information. It will be\r\nused later by online schema swap process. This table will be replicated and\r\nchanged only on the master. As an exception to that rule creation of the table\r\nis added to the vttablet startup code to make sure that it's created during\r\nvttablet version update.\r\n\r\nCopying of the contents of _vt.shard_metadata table is added to horizontal\r\nresharding procedure to make sure that the contents of the table is consistent\r\nacross all shards of a single keyspace in cases when we are resharding only part\r\nof the source keyspace leaving another part intact. The check for existence of\r\n_vt.shard_metadata is still added to CopySchemaShard e.g. for a case when new\r\nvtworker code will work with older vttablet code.\r\n\r\nI've modified init_db.sql to create both _vt.shard_metadata and\r\n_vt.local_metadata tables because it's just logically correct to have them both\r\nin the tests since they will exist both in production. Tests are also adjusted\r\nto not clobber the _vt database when not needed since resharding code now\r\ndepends on _vt.shard_metadata table existence.\r\n\r\n@alainjobart @michael-berlin ","created_at":"2016-08-12T23:10:59Z","updated_at":"2016-08-12T23:10:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/youtube/vitess/pulls/1940/commits","review_comments_url":"https://api.github.com/repos/youtube/vitess/pulls/1940/comments","review_comment_url":"https://api.github.com/repos/youtube/vitess/pulls/comments{/number}","comments_url":"https://api.github.com/repos/youtube/vitess/issues/1940/comments","statuses_url":"https://api.github.com/repos/youtube/vitess/statuses/b327051faa1ad3189cf18790b8ed8519e6fb3d1a","head":{"label":"pivanof:shard_metadata","ref":"shard_metadata","sha":"b327051faa1ad3189cf18790b8ed8519e6fb3d1a","user":{"login":"pivanof","id":5752651,"avatar_url":"https://avatars.githubusercontent.com/u/5752651?v=3","gravatar_id":"","url":"https://api.github.com/users/pivanof","html_url":"https://github.com/pivanof","followers_url":"https://api.github.com/users/pivanof/followers","following_url":"https://api.github.com/users/pivanof/following{/other_user}","gists_url":"https://api.github.com/users/pivanof/gists{/gist_id}","starred_url":"https://api.github.com/users/pivanof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivanof/subscriptions","organizations_url":"https://api.github.com/users/pivanof/orgs","repos_url":"https://api.github.com/users/pivanof/repos","events_url":"https://api.github.com/users/pivanof/events{/privacy}","received_events_url":"https://api.github.com/users/pivanof/received_events","type":"User","site_admin":false},"repo":{"id":60875065,"name":"vitess","full_name":"pivanof/vitess","owner":{"login":"pivanof","id":5752651,"avatar_url":"https://avatars.githubusercontent.com/u/5752651?v=3","gravatar_id":"","url":"https://api.github.com/users/pivanof","html_url":"https://github.com/pivanof","followers_url":"https://api.github.com/users/pivanof/followers","following_url":"https://api.github.com/users/pivanof/following{/other_user}","gists_url":"https://api.github.com/users/pivanof/gists{/gist_id}","starred_url":"https://api.github.com/users/pivanof/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pivanof/subscriptions","organizations_url":"https://api.github.com/users/pivanof/orgs","repos_url":"https://api.github.com/users/pivanof/repos","events_url":"https://api.github.com/users/pivanof/events{/privacy}","received_events_url":"https://api.github.com/users/pivanof/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/pivanof/vitess","description":"vitess provides servers and tools which facilitate scaling of MySQL databases for large scale web services.","fork":true,"url":"https://api.github.com/repos/pivanof/vitess","forks_url":"https://api.github.com/repos/pivanof/vitess/forks","keys_url":"https://api.github.com/repos/pivanof/vitess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pivanof/vitess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pivanof/vitess/teams","hooks_url":"https://api.github.com/repos/pivanof/vitess/hooks","issue_events_url":"https://api.github.com/repos/pivanof/vitess/issues/events{/number}","events_url":"https://api.github.com/repos/pivanof/vitess/events","assignees_url":"https://api.github.com/repos/pivanof/vitess/assignees{/user}","branches_url":"https://api.github.com/repos/pivanof/vitess/branches{/branch}","tags_url":"https://api.github.com/repos/pivanof/vitess/tags","blobs_url":"https://api.github.com/repos/pivanof/vitess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pivanof/vitess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pivanof/vitess/git/refs{/sha}","trees_url":"https://api.github.com/repos/pivanof/vitess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pivanof/vitess/statuses/{sha}","languages_url":"https://api.github.com/repos/pivanof/vitess/languages","stargazers_url":"https://api.github.com/repos/pivanof/vitess/stargazers","contributors_url":"https://api.github.com/repos/pivanof/vitess/contributors","subscribers_url":"https://api.github.com/repos/pivanof/vitess/subscribers","subscription_url":"https://api.github.com/repos/pivanof/vitess/subscription","commits_url":"https://api.github.com/repos/pivanof/vitess/commits{/sha}","git_commits_url":"https://api.github.com/repos/pivanof/vitess/git/commits{/sha}","comments_url":"https://api.github.com/repos/pivanof/vitess/comments{/number}","issue_comment_url":"https://api.github.com/repos/pivanof/vitess/issues/comments{/number}","contents_url":"https://api.github.com/repos/pivanof/vitess/contents/{+path}","compare_url":"https://api.github.com/repos/pivanof/vitess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pivanof/vitess/merges","archive_url":"https://api.github.com/repos/pivanof/vitess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pivanof/vitess/downloads","issues_url":"https://api.github.com/repos/pivanof/vitess/issues{/number}","pulls_url":"https://api.github.com/repos/pivanof/vitess/pulls{/number}","milestones_url":"https://api.github.com/repos/pivanof/vitess/milestones{/number}","notifications_url":"https://api.github.com/repos/pivanof/vitess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pivanof/vitess/labels{/name}","releases_url":"https://api.github.com/repos/pivanof/vitess/releases{/id}","deployments_url":"https://api.github.com/repos/pivanof/vitess/deployments","created_at":"2016-06-10T20:28:57Z","updated_at":"2016-06-10T20:29:02Z","pushed_at":"2016-08-12T23:09:57Z","git_url":"git://github.com/pivanof/vitess.git","ssh_url":"git@github.com:pivanof/vitess.git","clone_url":"https://github.com/pivanof/vitess.git","svn_url":"https://github.com/pivanof/vitess","homepage":null,"size":63059,"stargazers_count":0,"watchers_count":0,"language":"Go","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"youtube:master","ref":"master","sha":"20be289fac190e160de0ebb4a3ea3a640449f933","user":{"login":"youtube","id":4052902,"avatar_url":"https://avatars.githubusercontent.com/u/4052902?v=3","gravatar_id":"","url":"https://api.github.com/users/youtube","html_url":"https://github.com/youtube","followers_url":"https://api.github.com/users/youtube/followers","following_url":"https://api.github.com/users/youtube/following{/other_user}","gists_url":"https://api.github.com/users/youtube/gists{/gist_id}","starred_url":"https://api.github.com/users/youtube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youtube/subscriptions","organizations_url":"https://api.github.com/users/youtube/orgs","repos_url":"https://api.github.com/users/youtube/repos","events_url":"https://api.github.com/users/youtube/events{/privacy}","received_events_url":"https://api.github.com/users/youtube/received_events","type":"Organization","site_admin":false},"repo":{"id":11008207,"name":"vitess","full_name":"youtube/vitess","owner":{"login":"youtube","id":4052902,"avatar_url":"https://avatars.githubusercontent.com/u/4052902?v=3","gravatar_id":"","url":"https://api.github.com/users/youtube","html_url":"https://github.com/youtube","followers_url":"https://api.github.com/users/youtube/followers","following_url":"https://api.github.com/users/youtube/following{/other_user}","gists_url":"https://api.github.com/users/youtube/gists{/gist_id}","starred_url":"https://api.github.com/users/youtube/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/youtube/subscriptions","organizations_url":"https://api.github.com/users/youtube/orgs","repos_url":"https://api.github.com/users/youtube/repos","events_url":"https://api.github.com/users/youtube/events{/privacy}","received_events_url":"https://api.github.com/users/youtube/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/youtube/vitess","description":"vitess provides servers and tools which facilitate scaling of MySQL databases for large scale web services.","fork":false,"url":"https://api.github.com/repos/youtube/vitess","forks_url":"https://api.github.com/repos/youtube/vitess/forks","keys_url":"https://api.github.com/repos/youtube/vitess/keys{/key_id}","collaborators_url":"https://api.github.com/repos/youtube/vitess/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/youtube/vitess/teams","hooks_url":"https://api.github.com/repos/youtube/vitess/hooks","issue_events_url":"https://api.github.com/repos/youtube/vitess/issues/events{/number}","events_url":"https://api.github.com/repos/youtube/vitess/events","assignees_url":"https://api.github.com/repos/youtube/vitess/assignees{/user}","branches_url":"https://api.github.com/repos/youtube/vitess/branches{/branch}","tags_url":"https://api.github.com/repos/youtube/vitess/tags","blobs_url":"https://api.github.com/repos/youtube/vitess/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/youtube/vitess/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/youtube/vitess/git/refs{/sha}","trees_url":"https://api.github.com/repos/youtube/vitess/git/trees{/sha}","statuses_url":"https://api.github.com/repos/youtube/vitess/statuses/{sha}","languages_url":"https://api.github.com/repos/youtube/vitess/languages","stargazers_url":"https://api.github.com/repos/youtube/vitess/stargazers","contributors_url":"https://api.github.com/repos/youtube/vitess/contributors","subscribers_url":"https://api.github.com/repos/youtube/vitess/subscribers","subscription_url":"https://api.github.com/repos/youtube/vitess/subscription","commits_url":"https://api.github.com/repos/youtube/vitess/commits{/sha}","git_commits_url":"https://api.github.com/repos/youtube/vitess/git/commits{/sha}","comments_url":"https://api.github.com/repos/youtube/vitess/comments{/number}","issue_comment_url":"https://api.github.com/repos/youtube/vitess/issues/comments{/number}","contents_url":"https://api.github.com/repos/youtube/vitess/contents/{+path}","compare_url":"https://api.github.com/repos/youtube/vitess/compare/{base}...{head}","merges_url":"https://api.github.com/repos/youtube/vitess/merges","archive_url":"https://api.github.com/repos/youtube/vitess/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/youtube/vitess/downloads","issues_url":"https://api.github.com/repos/youtube/vitess/issues{/number}","pulls_url":"https://api.github.com/repos/youtube/vitess/pulls{/number}","milestones_url":"https://api.github.com/repos/youtube/vitess/milestones{/number}","notifications_url":"https://api.github.com/repos/youtube/vitess/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/youtube/vitess/labels{/name}","releases_url":"https://api.github.com/repos/youtube/vitess/releases{/id}","deployments_url":"https://api.github.com/repos/youtube/vitess/deployments","created_at":"2013-06-27T21:20:28Z","updated_at":"2016-08-12T14:02:48Z","pushed_at":"2016-08-12T23:10:59Z","git_url":"git://github.com/youtube/vitess.git","ssh_url":"git@github.com:youtube/vitess.git","clone_url":"https://github.com/youtube/vitess.git","svn_url":"https://github.com/youtube/vitess","homepage":null,"size":88720,"stargazers_count":3731,"watchers_count":3731,"language":"Go","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":483,"mirror_url":null,"open_issues_count":21,"forks":483,"open_issues":21,"watchers":3731,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/youtube/vitess/pulls/1940"},"html":{"href":"https://github.com/youtube/vitess/pull/1940"},"issue":{"href":"https://api.github.com/repos/youtube/vitess/issues/1940"},"comments":{"href":"https://api.github.com/repos/youtube/vitess/issues/1940/comments"},"review_comments":{"href":"https://api.github.com/repos/youtube/vitess/pulls/1940/comments"},"review_comment":{"href":"https://api.github.com/repos/youtube/vitess/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/youtube/vitess/pulls/1940/commits"},"statuses":{"href":"https://api.github.com/repos/youtube/vitess/statuses/b327051faa1ad3189cf18790b8ed8519e6fb3d1a"}},"merged":false,"mergeable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"commits":1,"additions":92,"deletions":9,"changed_files":8}}
{"actor":{"display_login":"pivanof"}}