{"action":"closed","number":6750,"pull_request":{"url":"https://api.github.com/repos/pingcap/tidb/pulls/6750","id":192375006,"node_id":"MDExOlB1bGxSZXF1ZXN0MTkyMzc1MDA2","html_url":"https://github.com/pingcap/tidb/pull/6750","diff_url":"https://github.com/pingcap/tidb/pull/6750.diff","patch_url":"https://github.com/pingcap/tidb/pull/6750.patch","issue_url":"https://api.github.com/repos/pingcap/tidb/issues/6750","number":6750,"state":"closed","locked":false,"title":"store, kvencoder: add a options to disable txn local latches in mockTikvStore, which may cause lightning to be oom.","user":{"login":"winkyao","id":6949944,"node_id":"MDQ6VXNlcjY5NDk5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6949944?v=4","gravatar_id":"","url":"https://api.github.com/users/winkyao","html_url":"https://github.com/winkyao","followers_url":"https://api.github.com/users/winkyao/followers","following_url":"https://api.github.com/users/winkyao/following{/other_user}","gists_url":"https://api.github.com/users/winkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/winkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winkyao/subscriptions","organizations_url":"https://api.github.com/users/winkyao/orgs","repos_url":"https://api.github.com/users/winkyao/repos","events_url":"https://api.github.com/users/winkyao/events{/privacy}","received_events_url":"https://api.github.com/users/winkyao/received_events","type":"User","site_admin":false},"body":"Lightning use mockTikvStore to convert sql to kv pairs, it is newed by NewTestTiKVStore:\r\n\r\n```\r\n// NewTestTiKVStore creates a test store with Option\r\nfunc NewTestTiKVStore(client Client, pdClient pd.Client, clientHijack func(Client) Client, pdClientHijack func(pd.Client) pd.Client, disableTxnLocalLatches bool) (kv.Storage, error) {\r\n\tif clientHijack != nil {\r\n\t\tclient = clientHijack(client)\r\n\t}\r\n\r\n\tpdCli := pd.Client(&codecPDClient{pdClient})\r\n\tif pdClientHijack != nil {\r\n\t\tpdCli = pdClientHijack(pdCli)\r\n\t}\r\n\r\n\t// Make sure the uuid is unique.\r\n\tuid := uuid.NewV4().String()\r\n\tspkv := NewMockSafePointKV()\r\n\ttikvStore, err := newTikvStore(uid, pdCli, spkv, client, false)\r\n\ttikvStore.EnableTxnLocalLatches(1024000)\r\n\r\n\ttikvStore.mock = true\r\n\treturn tikvStore, errors.Trace(err)\r\n}\r\n```\r\n\r\nNewTestTiKVStore will definitely new a 100mb txn local latches, which is useless in lightning, and will lead lightning to oom. So we add an option to disable it in kvencoder.\r\n\r\n@holys @huachaohuang PTAL\r\n","created_at":"2018-06-04T11:16:18Z","updated_at":"2018-06-05T03:19:05Z","closed_at":"2018-06-05T03:19:05Z","merged_at":"2018-06-05T03:19:05Z","merge_commit_sha":"1e82cb9632346d35b61e416eae0264447cb3a855","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":564600738,"node_id":"MDU6TGFiZWw1NjQ2MDA3Mzg=","url":"https://api.github.com/repos/pingcap/tidb/labels/LGT2","name":"LGT2","color":"5319e7","default":false},{"id":770872605,"node_id":"MDU6TGFiZWw3NzA4NzI2MDU=","url":"https://api.github.com/repos/pingcap/tidb/labels/all-tests-passed","name":"all-tests-passed","color":"2cbe4e","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/pingcap/tidb/pulls/6750/commits","review_comments_url":"https://api.github.com/repos/pingcap/tidb/pulls/6750/comments","review_comment_url":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pingcap/tidb/issues/6750/comments","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/7459e43a1168e3e696e70d00c75daf74398f36a4","head":{"label":"winkyao:fix_lightning_oom","ref":"fix_lightning_oom","sha":"7459e43a1168e3e696e70d00c75daf74398f36a4","user":{"login":"winkyao","id":6949944,"node_id":"MDQ6VXNlcjY5NDk5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6949944?v=4","gravatar_id":"","url":"https://api.github.com/users/winkyao","html_url":"https://github.com/winkyao","followers_url":"https://api.github.com/users/winkyao/followers","following_url":"https://api.github.com/users/winkyao/following{/other_user}","gists_url":"https://api.github.com/users/winkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/winkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winkyao/subscriptions","organizations_url":"https://api.github.com/users/winkyao/orgs","repos_url":"https://api.github.com/users/winkyao/repos","events_url":"https://api.github.com/users/winkyao/events{/privacy}","received_events_url":"https://api.github.com/users/winkyao/received_events","type":"User","site_admin":false},"repo":{"id":107374778,"node_id":"MDEwOlJlcG9zaXRvcnkxMDczNzQ3Nzg=","name":"tidb","full_name":"winkyao/tidb","owner":{"login":"winkyao","id":6949944,"node_id":"MDQ6VXNlcjY5NDk5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6949944?v=4","gravatar_id":"","url":"https://api.github.com/users/winkyao","html_url":"https://github.com/winkyao","followers_url":"https://api.github.com/users/winkyao/followers","following_url":"https://api.github.com/users/winkyao/following{/other_user}","gists_url":"https://api.github.com/users/winkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/winkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winkyao/subscriptions","organizations_url":"https://api.github.com/users/winkyao/orgs","repos_url":"https://api.github.com/users/winkyao/repos","events_url":"https://api.github.com/users/winkyao/events{/privacy}","received_events_url":"https://api.github.com/users/winkyao/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/winkyao/tidb","description":"TiDB is a distributed NewSQL database compatible with MySQL protocol ","fork":true,"url":"https://api.github.com/repos/winkyao/tidb","forks_url":"https://api.github.com/repos/winkyao/tidb/forks","keys_url":"https://api.github.com/repos/winkyao/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/winkyao/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/winkyao/tidb/teams","hooks_url":"https://api.github.com/repos/winkyao/tidb/hooks","issue_events_url":"https://api.github.com/repos/winkyao/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/winkyao/tidb/events","assignees_url":"https://api.github.com/repos/winkyao/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/winkyao/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/winkyao/tidb/tags","blobs_url":"https://api.github.com/repos/winkyao/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/winkyao/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/winkyao/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/winkyao/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/winkyao/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/winkyao/tidb/languages","stargazers_url":"https://api.github.com/repos/winkyao/tidb/stargazers","contributors_url":"https://api.github.com/repos/winkyao/tidb/contributors","subscribers_url":"https://api.github.com/repos/winkyao/tidb/subscribers","subscription_url":"https://api.github.com/repos/winkyao/tidb/subscription","commits_url":"https://api.github.com/repos/winkyao/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/winkyao/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/winkyao/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/winkyao/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/winkyao/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/winkyao/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/winkyao/tidb/merges","archive_url":"https://api.github.com/repos/winkyao/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/winkyao/tidb/downloads","issues_url":"https://api.github.com/repos/winkyao/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/winkyao/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/winkyao/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/winkyao/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/winkyao/tidb/labels{/name}","releases_url":"https://api.github.com/repos/winkyao/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/winkyao/tidb/deployments","created_at":"2017-10-18T07:41:20Z","updated_at":"2017-10-18T07:41:50Z","pushed_at":"2018-06-05T02:45:01Z","git_url":"git://github.com/winkyao/tidb.git","ssh_url":"git@github.com:winkyao/tidb.git","clone_url":"https://github.com/winkyao/tidb.git","svn_url":"https://github.com/winkyao/tidb","homepage":"https://pingcap.com","size":48693,"stargazers_count":1,"watchers_count":1,"language":"Go","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"pingcap:master","ref":"master","sha":"13050b4d60ebe2da156af7e15774e28119dae165","user":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"repo":{"id":41986369,"node_id":"MDEwOlJlcG9zaXRvcnk0MTk4NjM2OQ==","name":"tidb","full_name":"pingcap/tidb","owner":{"login":"pingcap","id":11855343,"node_id":"MDEyOk9yZ2FuaXphdGlvbjExODU1MzQz","avatar_url":"https://avatars3.githubusercontent.com/u/11855343?v=4","gravatar_id":"","url":"https://api.github.com/users/pingcap","html_url":"https://github.com/pingcap","followers_url":"https://api.github.com/users/pingcap/followers","following_url":"https://api.github.com/users/pingcap/following{/other_user}","gists_url":"https://api.github.com/users/pingcap/gists{/gist_id}","starred_url":"https://api.github.com/users/pingcap/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pingcap/subscriptions","organizations_url":"https://api.github.com/users/pingcap/orgs","repos_url":"https://api.github.com/users/pingcap/repos","events_url":"https://api.github.com/users/pingcap/events{/privacy}","received_events_url":"https://api.github.com/users/pingcap/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pingcap/tidb","description":"TiDB is a distributed HTAP database compatible with the MySQL protocol ","fork":false,"url":"https://api.github.com/repos/pingcap/tidb","forks_url":"https://api.github.com/repos/pingcap/tidb/forks","keys_url":"https://api.github.com/repos/pingcap/tidb/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pingcap/tidb/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pingcap/tidb/teams","hooks_url":"https://api.github.com/repos/pingcap/tidb/hooks","issue_events_url":"https://api.github.com/repos/pingcap/tidb/issues/events{/number}","events_url":"https://api.github.com/repos/pingcap/tidb/events","assignees_url":"https://api.github.com/repos/pingcap/tidb/assignees{/user}","branches_url":"https://api.github.com/repos/pingcap/tidb/branches{/branch}","tags_url":"https://api.github.com/repos/pingcap/tidb/tags","blobs_url":"https://api.github.com/repos/pingcap/tidb/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pingcap/tidb/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pingcap/tidb/git/refs{/sha}","trees_url":"https://api.github.com/repos/pingcap/tidb/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pingcap/tidb/statuses/{sha}","languages_url":"https://api.github.com/repos/pingcap/tidb/languages","stargazers_url":"https://api.github.com/repos/pingcap/tidb/stargazers","contributors_url":"https://api.github.com/repos/pingcap/tidb/contributors","subscribers_url":"https://api.github.com/repos/pingcap/tidb/subscribers","subscription_url":"https://api.github.com/repos/pingcap/tidb/subscription","commits_url":"https://api.github.com/repos/pingcap/tidb/commits{/sha}","git_commits_url":"https://api.github.com/repos/pingcap/tidb/git/commits{/sha}","comments_url":"https://api.github.com/repos/pingcap/tidb/comments{/number}","issue_comment_url":"https://api.github.com/repos/pingcap/tidb/issues/comments{/number}","contents_url":"https://api.github.com/repos/pingcap/tidb/contents/{+path}","compare_url":"https://api.github.com/repos/pingcap/tidb/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pingcap/tidb/merges","archive_url":"https://api.github.com/repos/pingcap/tidb/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pingcap/tidb/downloads","issues_url":"https://api.github.com/repos/pingcap/tidb/issues{/number}","pulls_url":"https://api.github.com/repos/pingcap/tidb/pulls{/number}","milestones_url":"https://api.github.com/repos/pingcap/tidb/milestones{/number}","notifications_url":"https://api.github.com/repos/pingcap/tidb/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pingcap/tidb/labels{/name}","releases_url":"https://api.github.com/repos/pingcap/tidb/releases{/id}","deployments_url":"https://api.github.com/repos/pingcap/tidb/deployments","created_at":"2015-09-06T04:01:52Z","updated_at":"2018-06-05T02:12:08Z","pushed_at":"2018-06-05T03:19:05Z","git_url":"git://github.com/pingcap/tidb.git","ssh_url":"git@github.com:pingcap/tidb.git","clone_url":"https://github.com/pingcap/tidb.git","svn_url":"https://github.com/pingcap/tidb","homepage":"https://pingcap.com","size":74400,"stargazers_count":13533,"watchers_count":13533,"language":"Go","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1843,"mirror_url":null,"archived":false,"open_issues_count":426,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":1843,"open_issues":426,"watchers":13533,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/6750"},"html":{"href":"https://github.com/pingcap/tidb/pull/6750"},"issue":{"href":"https://api.github.com/repos/pingcap/tidb/issues/6750"},"comments":{"href":"https://api.github.com/repos/pingcap/tidb/issues/6750/comments"},"review_comments":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/6750/comments"},"review_comment":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pingcap/tidb/pulls/6750/commits"},"statuses":{"href":"https://api.github.com/repos/pingcap/tidb/statuses/7459e43a1168e3e696e70d00c75daf74398f36a4"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"winkyao","id":6949944,"node_id":"MDQ6VXNlcjY5NDk5NDQ=","avatar_url":"https://avatars0.githubusercontent.com/u/6949944?v=4","gravatar_id":"","url":"https://api.github.com/users/winkyao","html_url":"https://github.com/winkyao","followers_url":"https://api.github.com/users/winkyao/followers","following_url":"https://api.github.com/users/winkyao/following{/other_user}","gists_url":"https://api.github.com/users/winkyao/gists{/gist_id}","starred_url":"https://api.github.com/users/winkyao/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/winkyao/subscriptions","organizations_url":"https://api.github.com/users/winkyao/orgs","repos_url":"https://api.github.com/users/winkyao/repos","events_url":"https://api.github.com/users/winkyao/events{/privacy}","received_events_url":"https://api.github.com/users/winkyao/received_events","type":"User","site_admin":false},"comments":3,"review_comments":2,"maintainer_can_modify":false,"commits":2,"additions":24,"deletions":12,"changed_files":6}}
{"actor":{"display_login":"winkyao"}}