{"action":"created","comment":{"url":"https://api.github.com/repos/caskdata/tephra/pulls/comments/36341854","id":36341854,"diff_hunk":"@@ -51,11 +54,26 @@ public TransactionContext(TransactionSystemClient txClient, Iterable<Transaction\n    * Adds a new transaction-aware to participate in the transaction.\n    * @param txAware the new transaction-aware\n    */\n-  public void addTransactionAware(TransactionAware txAware) {\n-    this.txAwares.add(txAware);\n-    if (currentTx != null) {\n+  public boolean addTransactionAware(TransactionAware txAware) {\n+    // If the txAware is newly added, call startTx as well if there is an active transaction\n+    boolean added = txAwares.add(txAware);\n+    if (added && currentTx != null) {\n       txAware.startTx(currentTx);\n     }\n+    return added;\n+  }\n+\n+  /**\n+   * Removes a {@link TransactionAware} to withdraw from participation in the transaction. Withdrawal is only allowed","path":"tephra-core/src/main/java/co/cask/tephra/TransactionContext.java","position":36,"original_position":36,"commit_id":"dd0b16058e31e2ade28a7099f0a8c2a35256d896","original_commit_id":"dd0b16058e31e2ade28a7099f0a8c2a35256d896","user":{"login":"awholegunch","id":6394794,"avatar_url":"https://avatars.githubusercontent.com/u/6394794?v=3","gravatar_id":"","url":"https://api.github.com/users/awholegunch","html_url":"https://github.com/awholegunch","followers_url":"https://api.github.com/users/awholegunch/followers","following_url":"https://api.github.com/users/awholegunch/following{/other_user}","gists_url":"https://api.github.com/users/awholegunch/gists{/gist_id}","starred_url":"https://api.github.com/users/awholegunch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awholegunch/subscriptions","organizations_url":"https://api.github.com/users/awholegunch/orgs","repos_url":"https://api.github.com/users/awholegunch/repos","events_url":"https://api.github.com/users/awholegunch/events{/privacy}","received_events_url":"https://api.github.com/users/awholegunch/received_events","type":"User","site_admin":false},"body":"Removes a {@link TransactionAware} and withdraws from participation in the transaction. [Not certain if this is what you meant.]","created_at":"2015-08-05T19:11:22Z","updated_at":"2015-08-05T19:11:22Z","html_url":"https://github.com/caskdata/tephra/pull/71#discussion_r36341854","pull_request_url":"https://api.github.com/repos/caskdata/tephra/pulls/71","_links":{"self":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/comments/36341854"},"html":{"href":"https://github.com/caskdata/tephra/pull/71#discussion_r36341854"},"pull_request":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/71"}}},"pull_request":{"url":"https://api.github.com/repos/caskdata/tephra/pulls/71","id":41714035,"html_url":"https://github.com/caskdata/tephra/pull/71","diff_url":"https://github.com/caskdata/tephra/pull/71.diff","patch_url":"https://github.com/caskdata/tephra/pull/71.patch","issue_url":"https://api.github.com/repos/caskdata/tephra/issues/71","number":71,"state":"open","locked":false,"title":"(TEPHRA-117) Added the TransactionContext.removeTransactionAware method","user":{"login":"chtyim","id":885032,"avatar_url":"https://avatars.githubusercontent.com/u/885032?v=3","gravatar_id":"","url":"https://api.github.com/users/chtyim","html_url":"https://github.com/chtyim","followers_url":"https://api.github.com/users/chtyim/followers","following_url":"https://api.github.com/users/chtyim/following{/other_user}","gists_url":"https://api.github.com/users/chtyim/gists{/gist_id}","starred_url":"https://api.github.com/users/chtyim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/chtyim/subscriptions","organizations_url":"https://api.github.com/users/chtyim/orgs","repos_url":"https://api.github.com/users/chtyim/repos","events_url":"https://api.github.com/users/chtyim/events{/privacy}","received_events_url":"https://api.github.com/users/chtyim/received_events","type":"User","site_admin":false},"body":"- Removal is only allowed if there is no active transaction\r\n  - This is the prevent the TransactionAware being left in some unknown state","created_at":"2015-08-05T19:05:05Z","updated_at":"2015-08-05T19:11:22Z","closed_at":null,"merged_at":null,"merge_commit_sha":"e7237fcbe9206fdd427ef9180992ea1f4d3b526c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/caskdata/tephra/pulls/71/commits","review_comments_url":"https://api.github.com/repos/caskdata/tephra/pulls/71/comments","review_comment_url":"https://api.github.com/repos/caskdata/tephra/pulls/comments{/number}","comments_url":"https://api.github.com/repos/caskdata/tephra/issues/71/comments","statuses_url":"https://api.github.com/repos/caskdata/tephra/statuses/dd0b16058e31e2ade28a7099f0a8c2a35256d896","head":{"label":"caskdata:feature/TEPHRA-117-remove-tx-aware","ref":"feature/TEPHRA-117-remove-tx-aware","sha":"dd0b16058e31e2ade28a7099f0a8c2a35256d896","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":21894018,"name":"tephra","full_name":"caskdata/tephra","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/tephra","description":"Transactions for HBase","fork":false,"url":"https://api.github.com/repos/caskdata/tephra","forks_url":"https://api.github.com/repos/caskdata/tephra/forks","keys_url":"https://api.github.com/repos/caskdata/tephra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/tephra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/tephra/teams","hooks_url":"https://api.github.com/repos/caskdata/tephra/hooks","issue_events_url":"https://api.github.com/repos/caskdata/tephra/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/tephra/events","assignees_url":"https://api.github.com/repos/caskdata/tephra/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/tephra/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/tephra/tags","blobs_url":"https://api.github.com/repos/caskdata/tephra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/tephra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/tephra/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/tephra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/tephra/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/tephra/languages","stargazers_url":"https://api.github.com/repos/caskdata/tephra/stargazers","contributors_url":"https://api.github.com/repos/caskdata/tephra/contributors","subscribers_url":"https://api.github.com/repos/caskdata/tephra/subscribers","subscription_url":"https://api.github.com/repos/caskdata/tephra/subscription","commits_url":"https://api.github.com/repos/caskdata/tephra/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/tephra/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/tephra/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/tephra/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/tephra/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/tephra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/tephra/merges","archive_url":"https://api.github.com/repos/caskdata/tephra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/tephra/downloads","issues_url":"https://api.github.com/repos/caskdata/tephra/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/tephra/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/tephra/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/tephra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/tephra/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/tephra/releases{/id}","created_at":"2014-07-16T09:07:44Z","updated_at":"2015-07-29T13:03:35Z","pushed_at":"2015-08-05T19:05:06Z","git_url":"git://github.com/caskdata/tephra.git","ssh_url":"git@github.com:caskdata/tephra.git","clone_url":"https://github.com/caskdata/tephra.git","svn_url":"https://github.com/caskdata/tephra","homepage":"http://tephra.io","size":2391,"stargazers_count":83,"watchers_count":83,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":4,"forks":20,"open_issues":4,"watchers":83,"default_branch":"develop"}},"base":{"label":"caskdata:develop","ref":"develop","sha":"02a94bcd933279665cd29b968a8042ba62f7c14b","user":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"repo":{"id":21894018,"name":"tephra","full_name":"caskdata/tephra","owner":{"login":"caskdata","id":8123023,"avatar_url":"https://avatars.githubusercontent.com/u/8123023?v=3","gravatar_id":"","url":"https://api.github.com/users/caskdata","html_url":"https://github.com/caskdata","followers_url":"https://api.github.com/users/caskdata/followers","following_url":"https://api.github.com/users/caskdata/following{/other_user}","gists_url":"https://api.github.com/users/caskdata/gists{/gist_id}","starred_url":"https://api.github.com/users/caskdata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/caskdata/subscriptions","organizations_url":"https://api.github.com/users/caskdata/orgs","repos_url":"https://api.github.com/users/caskdata/repos","events_url":"https://api.github.com/users/caskdata/events{/privacy}","received_events_url":"https://api.github.com/users/caskdata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/caskdata/tephra","description":"Transactions for HBase","fork":false,"url":"https://api.github.com/repos/caskdata/tephra","forks_url":"https://api.github.com/repos/caskdata/tephra/forks","keys_url":"https://api.github.com/repos/caskdata/tephra/keys{/key_id}","collaborators_url":"https://api.github.com/repos/caskdata/tephra/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/caskdata/tephra/teams","hooks_url":"https://api.github.com/repos/caskdata/tephra/hooks","issue_events_url":"https://api.github.com/repos/caskdata/tephra/issues/events{/number}","events_url":"https://api.github.com/repos/caskdata/tephra/events","assignees_url":"https://api.github.com/repos/caskdata/tephra/assignees{/user}","branches_url":"https://api.github.com/repos/caskdata/tephra/branches{/branch}","tags_url":"https://api.github.com/repos/caskdata/tephra/tags","blobs_url":"https://api.github.com/repos/caskdata/tephra/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/caskdata/tephra/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/caskdata/tephra/git/refs{/sha}","trees_url":"https://api.github.com/repos/caskdata/tephra/git/trees{/sha}","statuses_url":"https://api.github.com/repos/caskdata/tephra/statuses/{sha}","languages_url":"https://api.github.com/repos/caskdata/tephra/languages","stargazers_url":"https://api.github.com/repos/caskdata/tephra/stargazers","contributors_url":"https://api.github.com/repos/caskdata/tephra/contributors","subscribers_url":"https://api.github.com/repos/caskdata/tephra/subscribers","subscription_url":"https://api.github.com/repos/caskdata/tephra/subscription","commits_url":"https://api.github.com/repos/caskdata/tephra/commits{/sha}","git_commits_url":"https://api.github.com/repos/caskdata/tephra/git/commits{/sha}","comments_url":"https://api.github.com/repos/caskdata/tephra/comments{/number}","issue_comment_url":"https://api.github.com/repos/caskdata/tephra/issues/comments{/number}","contents_url":"https://api.github.com/repos/caskdata/tephra/contents/{+path}","compare_url":"https://api.github.com/repos/caskdata/tephra/compare/{base}...{head}","merges_url":"https://api.github.com/repos/caskdata/tephra/merges","archive_url":"https://api.github.com/repos/caskdata/tephra/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/caskdata/tephra/downloads","issues_url":"https://api.github.com/repos/caskdata/tephra/issues{/number}","pulls_url":"https://api.github.com/repos/caskdata/tephra/pulls{/number}","milestones_url":"https://api.github.com/repos/caskdata/tephra/milestones{/number}","notifications_url":"https://api.github.com/repos/caskdata/tephra/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/caskdata/tephra/labels{/name}","releases_url":"https://api.github.com/repos/caskdata/tephra/releases{/id}","created_at":"2014-07-16T09:07:44Z","updated_at":"2015-07-29T13:03:35Z","pushed_at":"2015-08-05T19:05:06Z","git_url":"git://github.com/caskdata/tephra.git","ssh_url":"git@github.com:caskdata/tephra.git","clone_url":"https://github.com/caskdata/tephra.git","svn_url":"https://github.com/caskdata/tephra","homepage":"http://tephra.io","size":2391,"stargazers_count":83,"watchers_count":83,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":20,"mirror_url":null,"open_issues_count":4,"forks":20,"open_issues":4,"watchers":83,"default_branch":"develop"}},"_links":{"self":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/71"},"html":{"href":"https://github.com/caskdata/tephra/pull/71"},"issue":{"href":"https://api.github.com/repos/caskdata/tephra/issues/71"},"comments":{"href":"https://api.github.com/repos/caskdata/tephra/issues/71/comments"},"review_comments":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/71/comments"},"review_comment":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/caskdata/tephra/pulls/71/commits"},"statuses":{"href":"https://api.github.com/repos/caskdata/tephra/statuses/dd0b16058e31e2ade28a7099f0a8c2a35256d896"}}}}