{"action":"opened","number":8986,"pull_request":{"url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986","id":236501060,"node_id":"MDExOlB1bGxSZXF1ZXN0MjM2NTAxMDYw","html_url":"https://github.com/ARMmbed/mbed-os/pull/8986","diff_url":"https://github.com/ARMmbed/mbed-os/pull/8986.diff","patch_url":"https://github.com/ARMmbed/mbed-os/pull/8986.patch","issue_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8986","number":8986,"state":"open","locked":false,"title":"Fix a few bugs in TDBStore and KV config","user":{"login":"davidsaada","id":30656454,"node_id":"MDQ6VXNlcjMwNjU2NDU0","avatar_url":"https://avatars3.githubusercontent.com/u/30656454?v=4","gravatar_id":"","url":"https://api.github.com/users/davidsaada","html_url":"https://github.com/davidsaada","followers_url":"https://api.github.com/users/davidsaada/followers","following_url":"https://api.github.com/users/davidsaada/following{/other_user}","gists_url":"https://api.github.com/users/davidsaada/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsaada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsaada/subscriptions","organizations_url":"https://api.github.com/users/davidsaada/orgs","repos_url":"https://api.github.com/users/davidsaada/repos","events_url":"https://api.github.com/users/davidsaada/events{/privacy}","received_events_url":"https://api.github.com/users/davidsaada/received_events","type":"User","site_admin":false},"body":"### Description\r\nThis PR fixes a few bugs in TDBStore and KV config. \r\n1. Don't initialize TDBStore if already initialized.\r\n2. When reading a TDBStore record, make sure size calculation don't wrap around (can happen in a corrupt record).\r\n3. Fix a few problems in KV config init and deinit logic.\r\n\r\n### Pull request type\r\n    [x] Fix\r\n    [ ] Refactor\r\n    [ ] Target update\r\n    [ ] Functionality change\r\n    [ ] Docs update\r\n    [ ] Test update\r\n    [ ] Breaking change\r\n\r\n","created_at":"2018-12-06T11:45:08Z","updated_at":"2018-12-06T11:45:08Z","closed_at":null,"merged_at":null,"merge_commit_sha":null,"assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986/commits","review_comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986/comments","review_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8986/comments","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/e1bd5c9face683199235faa70ba13a3aa92c01d1","head":{"label":"davidsaada:david_tdbstore_fixes","ref":"david_tdbstore_fixes","sha":"e1bd5c9face683199235faa70ba13a3aa92c01d1","user":{"login":"davidsaada","id":30656454,"node_id":"MDQ6VXNlcjMwNjU2NDU0","avatar_url":"https://avatars3.githubusercontent.com/u/30656454?v=4","gravatar_id":"","url":"https://api.github.com/users/davidsaada","html_url":"https://github.com/davidsaada","followers_url":"https://api.github.com/users/davidsaada/followers","following_url":"https://api.github.com/users/davidsaada/following{/other_user}","gists_url":"https://api.github.com/users/davidsaada/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsaada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsaada/subscriptions","organizations_url":"https://api.github.com/users/davidsaada/orgs","repos_url":"https://api.github.com/users/davidsaada/repos","events_url":"https://api.github.com/users/davidsaada/events{/privacy}","received_events_url":"https://api.github.com/users/davidsaada/received_events","type":"User","site_admin":false},"repo":{"id":113969228,"node_id":"MDEwOlJlcG9zaXRvcnkxMTM5NjkyMjg=","name":"mbed-os","full_name":"davidsaada/mbed-os","private":false,"owner":{"login":"davidsaada","id":30656454,"node_id":"MDQ6VXNlcjMwNjU2NDU0","avatar_url":"https://avatars3.githubusercontent.com/u/30656454?v=4","gravatar_id":"","url":"https://api.github.com/users/davidsaada","html_url":"https://github.com/davidsaada","followers_url":"https://api.github.com/users/davidsaada/followers","following_url":"https://api.github.com/users/davidsaada/following{/other_user}","gists_url":"https://api.github.com/users/davidsaada/gists{/gist_id}","starred_url":"https://api.github.com/users/davidsaada/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davidsaada/subscriptions","organizations_url":"https://api.github.com/users/davidsaada/orgs","repos_url":"https://api.github.com/users/davidsaada/repos","events_url":"https://api.github.com/users/davidsaada/events{/privacy}","received_events_url":"https://api.github.com/users/davidsaada/received_events","type":"User","site_admin":false},"html_url":"https://github.com/davidsaada/mbed-os","description":"ARM mbed OS is a platform operating system designed for the internet of things","fork":true,"url":"https://api.github.com/repos/davidsaada/mbed-os","forks_url":"https://api.github.com/repos/davidsaada/mbed-os/forks","keys_url":"https://api.github.com/repos/davidsaada/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/davidsaada/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/davidsaada/mbed-os/teams","hooks_url":"https://api.github.com/repos/davidsaada/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/davidsaada/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/davidsaada/mbed-os/events","assignees_url":"https://api.github.com/repos/davidsaada/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/davidsaada/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/davidsaada/mbed-os/tags","blobs_url":"https://api.github.com/repos/davidsaada/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/davidsaada/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/davidsaada/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/davidsaada/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/davidsaada/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/davidsaada/mbed-os/languages","stargazers_url":"https://api.github.com/repos/davidsaada/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/davidsaada/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/davidsaada/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/davidsaada/mbed-os/subscription","commits_url":"https://api.github.com/repos/davidsaada/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/davidsaada/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/davidsaada/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/davidsaada/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/davidsaada/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/davidsaada/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/davidsaada/mbed-os/merges","archive_url":"https://api.github.com/repos/davidsaada/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/davidsaada/mbed-os/downloads","issues_url":"https://api.github.com/repos/davidsaada/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/davidsaada/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/davidsaada/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/davidsaada/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/davidsaada/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/davidsaada/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/davidsaada/mbed-os/deployments","created_at":"2017-12-12T09:19:54Z","updated_at":"2018-11-05T13:27:26Z","pushed_at":"2018-12-06T11:43:17Z","git_url":"git://github.com/davidsaada/mbed-os.git","ssh_url":"git@github.com:davidsaada/mbed-os.git","clone_url":"https://github.com/davidsaada/mbed-os.git","svn_url":"https://github.com/davidsaada/mbed-os","homepage":"https://mbed.com","size":247484,"stargazers_count":1,"watchers_count":1,"language":"C","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":2,"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":1,"open_issues":2,"watchers":1,"default_branch":"master"}},"base":{"label":"ARMmbed:master","ref":"master","sha":"8301325481966a524ed0a93cfbb2b0c7f446ae54","user":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"repo":{"id":8270972,"node_id":"MDEwOlJlcG9zaXRvcnk4MjcwOTcy","name":"mbed-os","full_name":"ARMmbed/mbed-os","private":false,"owner":{"login":"ARMmbed","id":8916057,"node_id":"MDEyOk9yZ2FuaXphdGlvbjg5MTYwNTc=","avatar_url":"https://avatars3.githubusercontent.com/u/8916057?v=4","gravatar_id":"","url":"https://api.github.com/users/ARMmbed","html_url":"https://github.com/ARMmbed","followers_url":"https://api.github.com/users/ARMmbed/followers","following_url":"https://api.github.com/users/ARMmbed/following{/other_user}","gists_url":"https://api.github.com/users/ARMmbed/gists{/gist_id}","starred_url":"https://api.github.com/users/ARMmbed/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ARMmbed/subscriptions","organizations_url":"https://api.github.com/users/ARMmbed/orgs","repos_url":"https://api.github.com/users/ARMmbed/repos","events_url":"https://api.github.com/users/ARMmbed/events{/privacy}","received_events_url":"https://api.github.com/users/ARMmbed/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/ARMmbed/mbed-os","description":"Arm Mbed OS is a platform operating system designed for the internet of things","fork":false,"url":"https://api.github.com/repos/ARMmbed/mbed-os","forks_url":"https://api.github.com/repos/ARMmbed/mbed-os/forks","keys_url":"https://api.github.com/repos/ARMmbed/mbed-os/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ARMmbed/mbed-os/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ARMmbed/mbed-os/teams","hooks_url":"https://api.github.com/repos/ARMmbed/mbed-os/hooks","issue_events_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/events{/number}","events_url":"https://api.github.com/repos/ARMmbed/mbed-os/events","assignees_url":"https://api.github.com/repos/ARMmbed/mbed-os/assignees{/user}","branches_url":"https://api.github.com/repos/ARMmbed/mbed-os/branches{/branch}","tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/tags","blobs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/refs{/sha}","trees_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/{sha}","languages_url":"https://api.github.com/repos/ARMmbed/mbed-os/languages","stargazers_url":"https://api.github.com/repos/ARMmbed/mbed-os/stargazers","contributors_url":"https://api.github.com/repos/ARMmbed/mbed-os/contributors","subscribers_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscribers","subscription_url":"https://api.github.com/repos/ARMmbed/mbed-os/subscription","commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/commits{/sha}","git_commits_url":"https://api.github.com/repos/ARMmbed/mbed-os/git/commits{/sha}","comments_url":"https://api.github.com/repos/ARMmbed/mbed-os/comments{/number}","issue_comment_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues/comments{/number}","contents_url":"https://api.github.com/repos/ARMmbed/mbed-os/contents/{+path}","compare_url":"https://api.github.com/repos/ARMmbed/mbed-os/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ARMmbed/mbed-os/merges","archive_url":"https://api.github.com/repos/ARMmbed/mbed-os/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ARMmbed/mbed-os/downloads","issues_url":"https://api.github.com/repos/ARMmbed/mbed-os/issues{/number}","pulls_url":"https://api.github.com/repos/ARMmbed/mbed-os/pulls{/number}","milestones_url":"https://api.github.com/repos/ARMmbed/mbed-os/milestones{/number}","notifications_url":"https://api.github.com/repos/ARMmbed/mbed-os/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ARMmbed/mbed-os/labels{/name}","releases_url":"https://api.github.com/repos/ARMmbed/mbed-os/releases{/id}","deployments_url":"https://api.github.com/repos/ARMmbed/mbed-os/deployments","created_at":"2013-02-18T15:23:11Z","updated_at":"2018-12-06T10:34:59Z","pushed_at":"2018-12-06T11:42:08Z","git_url":"git://github.com/ARMmbed/mbed-os.git","ssh_url":"git@github.com:ARMmbed/mbed-os.git","clone_url":"https://github.com/ARMmbed/mbed-os.git","svn_url":"https://github.com/ARMmbed/mbed-os","homepage":"https://mbed.com","size":247891,"stargazers_count":2095,"watchers_count":2095,"language":"C","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":1700,"mirror_url":null,"archived":false,"open_issues_count":411,"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":1700,"open_issues":411,"watchers":2095,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986"},"html":{"href":"https://github.com/ARMmbed/mbed-os/pull/8986"},"issue":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8986"},"comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/issues/8986/comments"},"review_comments":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986/comments"},"review_comment":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/pulls/8986/commits"},"statuses":{"href":"https://api.github.com/repos/ARMmbed/mbed-os/statuses/e1bd5c9face683199235faa70ba13a3aa92c01d1"}},"author_association":"CONTRIBUTOR","merged":false,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":null,"comments":0,"review_comments":0,"maintainer_can_modify":true,"commits":1,"additions":18,"deletions":12,"changed_files":3}}
{"actor":{"display_login":"davidsaada"}}