[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16815613#comment-16815613 ] Andrew Purtell commented on HBASE-11685: Any progress here? Or unschedule it? Or close it? > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 1.5.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16758621#comment-16758621 ] Hadoop QA commented on HBASE-11685: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:blue}0{color} | {color:blue} patch {color} | {color:blue} 0m 3s{color} | {color:blue} The patch file was not named according to hbase's naming conventions. Please see https://yetus.apache.org/documentation/0.8.0/precommit-patchnames for instructions. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 5s{color} | {color:red} HBASE-11685 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.8.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-11685 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12661161/HBASE-11685-trunk-v6.diff | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/15841/console | | Powered by | Apache Yetus 0.8.0 http://yetus.apache.org | This message was automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 1.5.1 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v7.6.3#76005)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16070047#comment-16070047 ] Hadoop QA commented on HBASE-11685: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s{color} | {color:blue} Docker mode activated. {color} | | {color:blue}0{color} | {color:blue} patch {color} | {color:blue} 0m 2s{color} | {color:blue} The patch file was not named according to hbase's naming conventions. Please see https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for instructions. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 6s{color} | {color:red} HBASE-11685 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.4.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Issue | HBASE-11685 | | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12661161/HBASE-11685-trunk-v6.diff | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/7431/console | | Powered by | Apache Yetus 0.4.0 http://yetus.apache.org | This message was automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 1.5.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16070003#comment-16070003 ] stack commented on HBASE-11685: --- Made it a branch-1 issue. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 1.5.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.4.14#64029)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971057#comment-15971057 ] Hadoop QA commented on HBASE-11685: --- | (x) *{color:red}-1 overall{color}* | \\ \\ || Vote || Subsystem || Runtime || Comment || | {color:blue}0{color} | {color:blue} reexec {color} | {color:blue} 0m 0s {color} | {color:blue} Docker mode activated. {color} | | {color:blue}0{color} | {color:blue} patch {color} | {color:blue} 0m 6s {color} | {color:blue} The patch file was not named according to hbase's naming conventions. Please see https://yetus.apache.org/documentation/0.3.0/precommit-patchnames for instructions. {color} | | {color:red}-1{color} | {color:red} patch {color} | {color:red} 0m 10s {color} | {color:red} HBASE-11685 does not apply to master. Rebase required? Wrong Branch? See https://yetus.apache.org/documentation/0.3.0/precommit-patchnames for help. {color} | \\ \\ || Subsystem || Report/Notes || | JIRA Patch URL | https://issues.apache.org/jira/secure/attachment/12661161/HBASE-11685-trunk-v6.diff | | JIRA Issue | HBASE-11685 | | Console output | https://builds.apache.org/job/PreCommit-HBASE-Build/6465/console | | Powered by | Apache Yetus 0.3.0 http://yetus.apache.org | This message was automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15971051#comment-15971051 ] Chia-Ping Tsai commented on HBASE-11685: The ref count is removed in HBase 2.0 (see HBASE-14787). Shall we close this jira? Or change the version to branch-1 ? > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.3.15#6346)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14095312#comment-14095312 ] Nicolas Liochon commented on HBASE-11685: - Actually, there is no bug here: increments and decrements are done in ??synchronized (CONNECTION_INSTANCES)?? , so they are already atomic. There is no need to use atomicInteger here (a comment on the sync requirement would be welcome however :-) ) The exception is the finalize (before and after the patch): there is a set without synchronization. At the end, I would propose to just remove the finalize.. It's safer and makes the code simpler to read. We cannot rely on a finalize to free resources anyway. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094881#comment-14094881 ] Andrew Purtell commented on HBASE-11685: The problem with only logging a warning is we have code that expects the count never to go below zero and this patch is not changing callers of isZeroReference. Though it suppose isZeroReference could be updated here to return true if <= 0 > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094691#comment-14094691 ] Nicolas Liochon commented on HBASE-11685: - + refCount = new AtomicInteger(1); Could be replaced by a simple set, this would allow refCount to be final. It's theoretically better. I wonder if the "throw new RuntimeException("Negative ref count of connection: " + this;" cannot have a race condition with this set to 1 in the finalize? It could be simple to simply log a warning? > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14094496#comment-14094496 ] Andrew Purtell commented on HBASE-11685: v6 patch lgtm. Any comment or concerns [~nkeywal] or [~stack]? > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14093975#comment-14093975 ] Hadoop QA commented on HBASE-11685: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12661161/HBASE-11685-trunk-v6.diff against trunk revision . ATTACHMENT ID: 12661161 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:green}+1 tests included{color}. The patch appears to include 3 new or modified tests. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.TestRegionRebalancing {color:red}-1 core zombie tests{color}. There are 1 zombie test(s): at org.apache.hadoop.hbase.client.TestHCM.testClusterStatus(TestHCM.java:250) Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10398//console This message is automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff, HBASE-11685-trunk-v6.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14093812#comment-14093812 ] Hadoop QA commented on HBASE-11685: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12661133/HBASE-11685-trunk-v5.diff against trunk revision . ATTACHMENT ID: 12661133 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.TestMetaTableAccessorNoCluster org.apache.hadoop.hbase.security.token.TestZKSecretWatcher {color:red}-1 core zombie tests{color}. There are 1 zombie test(s): Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10395//console This message is automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff, > HBASE-11685-trunk-v5.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14093521#comment-14093521 ] Andrew Purtell commented on HBASE-11685: > is the earlier logic just the current codebase? What I mean by that is this: {code} void decCount() { if (refCount > 0) { --refCount; } } {code} This code does not allow the reference count to go below 0, which is what isZeroReference expects. The latest patch allows the reference count to go below 0 without changing isZeroReference or its callers to handle cases where the refcount is negative. > When the count goes negative, we should print warn log or throw an exception. Throwing an exception after insuring the connection is cleaned up is good, that would address the concern here. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14092358#comment-14092358 ] Liu Shaohui commented on HBASE-11685: - [~apurtell] {quote} I really think we need to preserve the earlier logic {quote} I'm sorry that i didn't get your meanings? is the earlier logic just the current codebase? The current codebase, the connection may never be closed out for two threads concurrently decrease the ref counter. And the following code just hides the the possible bug that there are more decCount ops than incCount ops in the code. {code} void decCount() { if (refCount > 0) { --refCount; } } {code} In my opinion,we should expose the bug as early as possible. (1) When the count goes negative, we should print warn log or throw an exception. (2) When someone forgets to call the decCount, and the ref count always be positive , the connection never be closed. we can find this problem from the output of jstack. I think the change doesn't introduce a new class of bug. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14091238#comment-14091238 ] Andrew Purtell commented on HBASE-11685: Sorry to keep coming back to this. {code} */ boolean isZeroReference() { - return refCount == 0; + return refCount.get() == 0; } {code} We use isZeroReference to detect if a connection can be reaped. If the count goes negative, and it can now after these changes, then isZeroReference will return false and the connection will never be closed out. I really think we need to preserve the earlier logic. This change seems likely to introduce a new class of bug > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff, HBASE-11685-trunk-v4.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14089623#comment-14089623 ] Andrew Purtell commented on HBASE-11685: There's a spelling error in the log message. Please change "nagative" to "negative". Is there any way to identify for which connection the ref count went negative? Would aid in debugging. Otherwise lgtm. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14088831#comment-14088831 ] Hadoop QA commented on HBASE-11685: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12660302/HBASE-11685-trunk-v3.diff against trunk revision . ATTACHMENT ID: 12660302 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.util.TestHBaseFsck org.apache.hadoop.hbase.master.TestMasterOperationsForRegionReplicas {color:red}-1 core zombie tests{color}. There are 3 zombie test(s): Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10332//console This message is automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff, > HBASE-11685-trunk-v3.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14088229#comment-14088229 ] Andrew Purtell commented on HBASE-11685: This change does not preserve the old behavior where we avoid taking refCount negative. A concern? We should warn loudly if this goes negative at least I think. {code} /** * Decrement this client's reference count. */ void decCount() { - if (refCount > 0) { ---refCount; - } + refCount.decrementAndGet(); } {code} > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff, HBASE-11685-trunk-v2.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)
[jira] [Commented] (HBASE-11685) Incr/decr on the reference count of HConnectionImplementation need be atomic
[ https://issues.apache.org/jira/browse/HBASE-11685?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14087603#comment-14087603 ] Hadoop QA commented on HBASE-11685: --- {color:red}-1 overall{color}. Here are the results of testing the latest attachment http://issues.apache.org/jira/secure/attachment/12660120/HBASE-11685-trunk-v1.diff against trunk revision . ATTACHMENT ID: 12660120 {color:green}+1 @author{color}. The patch does not contain any @author tags. {color:red}-1 tests included{color}. The patch doesn't appear to include any new or modified tests. Please justify why no new tests are needed for this patch. Also please list what manual steps were performed to verify this patch. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javac{color}. The applied patch does not increase the total number of javac compiler warnings. {color:green}+1 javadoc{color}. The javadoc tool did not generate any warning messages. {color:green}+1 findbugs{color}. The patch does not introduce any new Findbugs (version 2.0.3) warnings. {color:green}+1 release audit{color}. The applied patch does not increase the total number of release audit warnings. {color:green}+1 lineLengths{color}. The patch does not introduce lines longer than 100 {color:green}+1 site{color}. The mvn site goal succeeds with this patch. {color:red}-1 core tests{color}. The patch failed these unit tests: org.apache.hadoop.hbase.client.TestClientNoCluster Test results: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//testReport/ Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-client.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-thrift.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-server.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop2-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-protocol.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-examples.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-hadoop-compat.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-prefix-tree.html Findbugs warnings: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//artifact/patchprocess/newPatchFindbugsWarningshbase-common.html Console output: https://builds.apache.org/job/PreCommit-HBASE-Build/10313//console This message is automatically generated. > Incr/decr on the reference count of HConnectionImplementation need be atomic > - > > Key: HBASE-11685 > URL: https://issues.apache.org/jira/browse/HBASE-11685 > Project: HBase > Issue Type: Bug > Components: Client >Reporter: Liu Shaohui >Assignee: Liu Shaohui >Priority: Minor > Fix For: 2.0.0 > > Attachments: HBASE-11685-trunk-v1.diff > > > Currently, the incr/decr operation on the ref count of > HConnectionImplementation are not atomic. This may cause that the ref count > always be larger than 0 and the connection never be closed. > {code} > /** > * Increment this client's reference count. > */ > void incCount() { > ++refCount; > } > /** > * Decrement this client's reference count. > */ > void decCount() { > if (refCount > 0) { > --refCount; > } > } > {code} -- This message was sent by Atlassian JIRA (v6.2#6252)