{"action":"created","comment":{"url":"https://api.github.com/repos/apache/storm/pulls/comments/66784961","id":66784961,"diff_hunk":"@@ -77,7 +81,8 @@ public RedisKeyValueState(String namespace, JedisCommandsInstanceContainer jedis\n         this.keySerializer = keySerializer;\n         this.valueSerializer = valueSerializer;\n         this.jedisContainer = jedisContainer;\n-        this.pendingPrepare = new ConcurrentHashMap<>();","path":"external/storm-redis/src/main/java/org/apache/storm/redis/state/RedisKeyValueState.java","position":23,"original_position":23,"commit_id":"03e7c7276a8b5bc0e913ad4d28e7100101d6c029","original_commit_id":"03e7c7276a8b5bc0e913ad4d28e7100101d6c029","user":{"login":"arunmahadevan","id":6792890,"avatar_url":"https://avatars.githubusercontent.com/u/6792890?v=3","gravatar_id":"","url":"https://api.github.com/users/arunmahadevan","html_url":"https://github.com/arunmahadevan","followers_url":"https://api.github.com/users/arunmahadevan/followers","following_url":"https://api.github.com/users/arunmahadevan/following{/other_user}","gists_url":"https://api.github.com/users/arunmahadevan/gists{/gist_id}","starred_url":"https://api.github.com/users/arunmahadevan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/arunmahadevan/subscriptions","organizations_url":"https://api.github.com/users/arunmahadevan/orgs","repos_url":"https://api.github.com/users/arunmahadevan/repos","events_url":"https://api.github.com/users/arunmahadevan/events{/privacy}","received_events_url":"https://api.github.com/users/arunmahadevan/received_events","type":"User","site_admin":false},"body":"Could we somehow handle the deletes by maintaining an entry (with some extra info) within the pendingPrepare itself and avoid the extra hash sets and synchronized ? Something along the lines of maintaining a map of\r\n`key -> {ADD or DELETE, value}`. The values to be deleted could be written to a separate Redis Set during prepare.\r\n\r\nDuring `delete`, insert a DELETE entry into pendingPrepare.\r\nDuring `prepare`, snapshot pendingPrepare to pendingCommit and also save the DELETE entries to a redis set.\r\nDuring `commit`, delete the DELETE entries from redis map.\r\nDuring `get`, if key is in pendingPrepare, pendingCommit with DELETE or the key is not found return null.\r\n\r\n","created_at":"2016-06-13T12:45:59Z","updated_at":"2016-06-13T12:45:59Z","html_url":"https://github.com/apache/storm/pull/1470#discussion_r66784961","pull_request_url":"https://api.github.com/repos/apache/storm/pulls/1470","_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/comments/66784961"},"html":{"href":"https://github.com/apache/storm/pull/1470#discussion_r66784961"},"pull_request":{"href":"https://api.github.com/repos/apache/storm/pulls/1470"}}},"pull_request":{"url":"https://api.github.com/repos/apache/storm/pulls/1470","id":72863243,"html_url":"https://github.com/apache/storm/pull/1470","diff_url":"https://github.com/apache/storm/pull/1470.diff","patch_url":"https://github.com/apache/storm/pull/1470.patch","issue_url":"https://api.github.com/repos/apache/storm/issues/1470","number":1470,"state":"open","locked":false,"title":"STORM-1886 Extend KeyValueState iface with delete","user":{"login":"kosii","id":419033,"avatar_url":"https://avatars.githubusercontent.com/u/419033?v=3","gravatar_id":"","url":"https://api.github.com/users/kosii","html_url":"https://github.com/kosii","followers_url":"https://api.github.com/users/kosii/followers","following_url":"https://api.github.com/users/kosii/following{/other_user}","gists_url":"https://api.github.com/users/kosii/gists{/gist_id}","starred_url":"https://api.github.com/users/kosii/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kosii/subscriptions","organizations_url":"https://api.github.com/users/kosii/orgs","repos_url":"https://api.github.com/users/kosii/repos","events_url":"https://api.github.com/users/kosii/events{/privacy}","received_events_url":"https://api.github.com/users/kosii/received_events","type":"User","site_admin":false},"body":"The patch also provides implementation for delete in\r\nRedisKeyValueState and InMemoryKeyValueState.","created_at":"2016-06-07T12:09:01Z","updated_at":"2016-06-13T12:45:59Z","closed_at":null,"merged_at":null,"merge_commit_sha":"46d7b4076fd8ed771df3dfa36cc1fecd8c33c95f","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/apache/storm/pulls/1470/commits","review_comments_url":"https://api.github.com/repos/apache/storm/pulls/1470/comments","review_comment_url":"https://api.github.com/repos/apache/storm/pulls/comments{/number}","comments_url":"https://api.github.com/repos/apache/storm/issues/1470/comments","statuses_url":"https://api.github.com/repos/apache/storm/statuses/03e7c7276a8b5bc0e913ad4d28e7100101d6c029","head":{"label":"s4mDev:keyvaluestate-with-delete","ref":"keyvaluestate-with-delete","sha":"03e7c7276a8b5bc0e913ad4d28e7100101d6c029","user":{"login":"s4mDev","id":12137675,"avatar_url":"https://avatars.githubusercontent.com/u/12137675?v=3","gravatar_id":"","url":"https://api.github.com/users/s4mDev","html_url":"https://github.com/s4mDev","followers_url":"https://api.github.com/users/s4mDev/followers","following_url":"https://api.github.com/users/s4mDev/following{/other_user}","gists_url":"https://api.github.com/users/s4mDev/gists{/gist_id}","starred_url":"https://api.github.com/users/s4mDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4mDev/subscriptions","organizations_url":"https://api.github.com/users/s4mDev/orgs","repos_url":"https://api.github.com/users/s4mDev/repos","events_url":"https://api.github.com/users/s4mDev/events{/privacy}","received_events_url":"https://api.github.com/users/s4mDev/received_events","type":"User","site_admin":false},"repo":{"id":60518112,"name":"storm","full_name":"s4mDev/storm","owner":{"login":"s4mDev","id":12137675,"avatar_url":"https://avatars.githubusercontent.com/u/12137675?v=3","gravatar_id":"","url":"https://api.github.com/users/s4mDev","html_url":"https://github.com/s4mDev","followers_url":"https://api.github.com/users/s4mDev/followers","following_url":"https://api.github.com/users/s4mDev/following{/other_user}","gists_url":"https://api.github.com/users/s4mDev/gists{/gist_id}","starred_url":"https://api.github.com/users/s4mDev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/s4mDev/subscriptions","organizations_url":"https://api.github.com/users/s4mDev/orgs","repos_url":"https://api.github.com/users/s4mDev/repos","events_url":"https://api.github.com/users/s4mDev/events{/privacy}","received_events_url":"https://api.github.com/users/s4mDev/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/s4mDev/storm","description":"Mirror of Apache Storm","fork":true,"url":"https://api.github.com/repos/s4mDev/storm","forks_url":"https://api.github.com/repos/s4mDev/storm/forks","keys_url":"https://api.github.com/repos/s4mDev/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/s4mDev/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/s4mDev/storm/teams","hooks_url":"https://api.github.com/repos/s4mDev/storm/hooks","issue_events_url":"https://api.github.com/repos/s4mDev/storm/issues/events{/number}","events_url":"https://api.github.com/repos/s4mDev/storm/events","assignees_url":"https://api.github.com/repos/s4mDev/storm/assignees{/user}","branches_url":"https://api.github.com/repos/s4mDev/storm/branches{/branch}","tags_url":"https://api.github.com/repos/s4mDev/storm/tags","blobs_url":"https://api.github.com/repos/s4mDev/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/s4mDev/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/s4mDev/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/s4mDev/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/s4mDev/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/s4mDev/storm/languages","stargazers_url":"https://api.github.com/repos/s4mDev/storm/stargazers","contributors_url":"https://api.github.com/repos/s4mDev/storm/contributors","subscribers_url":"https://api.github.com/repos/s4mDev/storm/subscribers","subscription_url":"https://api.github.com/repos/s4mDev/storm/subscription","commits_url":"https://api.github.com/repos/s4mDev/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/s4mDev/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/s4mDev/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/s4mDev/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/s4mDev/storm/contents/{+path}","compare_url":"https://api.github.com/repos/s4mDev/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/s4mDev/storm/merges","archive_url":"https://api.github.com/repos/s4mDev/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/s4mDev/storm/downloads","issues_url":"https://api.github.com/repos/s4mDev/storm/issues{/number}","pulls_url":"https://api.github.com/repos/s4mDev/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/s4mDev/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/s4mDev/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/s4mDev/storm/labels{/name}","releases_url":"https://api.github.com/repos/s4mDev/storm/releases{/id}","deployments_url":"https://api.github.com/repos/s4mDev/storm/deployments","created_at":"2016-06-06T10:02:54Z","updated_at":"2016-06-06T10:02:59Z","pushed_at":"2016-06-07T12:07:49Z","git_url":"git://github.com/s4mDev/storm.git","ssh_url":"git@github.com:s4mDev/storm.git","clone_url":"https://github.com/s4mDev/storm.git","svn_url":"https://github.com/s4mDev/storm","homepage":null,"size":157368,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"apache:master","ref":"master","sha":"fa21c11b9a4be499d36d71810f677c1d2aa276fb","user":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"repo":{"id":14135470,"name":"storm","full_name":"apache/storm","owner":{"login":"apache","id":47359,"avatar_url":"https://avatars.githubusercontent.com/u/47359?v=3","gravatar_id":"","url":"https://api.github.com/users/apache","html_url":"https://github.com/apache","followers_url":"https://api.github.com/users/apache/followers","following_url":"https://api.github.com/users/apache/following{/other_user}","gists_url":"https://api.github.com/users/apache/gists{/gist_id}","starred_url":"https://api.github.com/users/apache/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/apache/subscriptions","organizations_url":"https://api.github.com/users/apache/orgs","repos_url":"https://api.github.com/users/apache/repos","events_url":"https://api.github.com/users/apache/events{/privacy}","received_events_url":"https://api.github.com/users/apache/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/apache/storm","description":"Mirror of Apache Storm","fork":false,"url":"https://api.github.com/repos/apache/storm","forks_url":"https://api.github.com/repos/apache/storm/forks","keys_url":"https://api.github.com/repos/apache/storm/keys{/key_id}","collaborators_url":"https://api.github.com/repos/apache/storm/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/apache/storm/teams","hooks_url":"https://api.github.com/repos/apache/storm/hooks","issue_events_url":"https://api.github.com/repos/apache/storm/issues/events{/number}","events_url":"https://api.github.com/repos/apache/storm/events","assignees_url":"https://api.github.com/repos/apache/storm/assignees{/user}","branches_url":"https://api.github.com/repos/apache/storm/branches{/branch}","tags_url":"https://api.github.com/repos/apache/storm/tags","blobs_url":"https://api.github.com/repos/apache/storm/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/apache/storm/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/apache/storm/git/refs{/sha}","trees_url":"https://api.github.com/repos/apache/storm/git/trees{/sha}","statuses_url":"https://api.github.com/repos/apache/storm/statuses/{sha}","languages_url":"https://api.github.com/repos/apache/storm/languages","stargazers_url":"https://api.github.com/repos/apache/storm/stargazers","contributors_url":"https://api.github.com/repos/apache/storm/contributors","subscribers_url":"https://api.github.com/repos/apache/storm/subscribers","subscription_url":"https://api.github.com/repos/apache/storm/subscription","commits_url":"https://api.github.com/repos/apache/storm/commits{/sha}","git_commits_url":"https://api.github.com/repos/apache/storm/git/commits{/sha}","comments_url":"https://api.github.com/repos/apache/storm/comments{/number}","issue_comment_url":"https://api.github.com/repos/apache/storm/issues/comments{/number}","contents_url":"https://api.github.com/repos/apache/storm/contents/{+path}","compare_url":"https://api.github.com/repos/apache/storm/compare/{base}...{head}","merges_url":"https://api.github.com/repos/apache/storm/merges","archive_url":"https://api.github.com/repos/apache/storm/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/apache/storm/downloads","issues_url":"https://api.github.com/repos/apache/storm/issues{/number}","pulls_url":"https://api.github.com/repos/apache/storm/pulls{/number}","milestones_url":"https://api.github.com/repos/apache/storm/milestones{/number}","notifications_url":"https://api.github.com/repos/apache/storm/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/apache/storm/labels{/name}","releases_url":"https://api.github.com/repos/apache/storm/releases{/id}","deployments_url":"https://api.github.com/repos/apache/storm/deployments","created_at":"2013-11-05T08:00:14Z","updated_at":"2016-06-12T12:37:06Z","pushed_at":"2016-06-13T05:26:02Z","git_url":"git://github.com/apache/storm.git","ssh_url":"git@github.com:apache/storm.git","clone_url":"https://github.com/apache/storm.git","svn_url":"https://github.com/apache/storm","homepage":null,"size":170524,"stargazers_count":3232,"watchers_count":3232,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":2428,"mirror_url":"git://git.apache.org/storm.git","open_issues_count":122,"forks":2428,"open_issues":122,"watchers":3232,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/apache/storm/pulls/1470"},"html":{"href":"https://github.com/apache/storm/pull/1470"},"issue":{"href":"https://api.github.com/repos/apache/storm/issues/1470"},"comments":{"href":"https://api.github.com/repos/apache/storm/issues/1470/comments"},"review_comments":{"href":"https://api.github.com/repos/apache/storm/pulls/1470/comments"},"review_comment":{"href":"https://api.github.com/repos/apache/storm/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/apache/storm/pulls/1470/commits"},"statuses":{"href":"https://api.github.com/repos/apache/storm/statuses/03e7c7276a8b5bc0e913ad4d28e7100101d6c029"}}}}
{"actor":{"display_login":"arunmahadevan"}}