[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-07 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995139#comment-14995139
 ] 

Hudson commented on HBASE-14759:


ABORTED: Integrated in HBase-1.3 #354 (See 
[https://builds.apache.org/job/HBase-1.3/354/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 234f31bd4a046a1eb8ecd15b3d5c2844c7916d6a)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-07 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995290#comment-14995290
 ] 

Hudson commented on HBASE-14759:


SUCCESS: Integrated in HBase-1.0 #1109 (See 
[https://builds.apache.org/job/HBase-1.0/1109/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 4456db6848a20c7290aa14dcda6b236ccfd2e8f1)
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14994772#comment-14994772
 ] 

Duo Zhang commented on HBASE-14759:
---

OK, Thanks. Let me commit this.

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14994991#comment-14994991
 ] 

Hudson commented on HBASE-14759:


SUCCESS: Integrated in HBase-1.3-IT #299 (See 
[https://builds.apache.org/job/HBase-1.3-IT/299/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 234f31bd4a046a1eb8ecd15b3d5c2844c7916d6a)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995049#comment-14995049
 ] 

Hudson commented on HBASE-14759:


FAILURE: Integrated in HBase-1.2 #353 (See 
[https://builds.apache.org/job/HBase-1.2/353/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 457fa656bcc3904758889019fac8ecb191161e7d)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995033#comment-14995033
 ] 

Hudson commented on HBASE-14759:


FAILURE: Integrated in HBase-Trunk_matrix #441 (See 
[https://builds.apache.org/job/HBase-Trunk_matrix/441/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 9cce912de01b7f2c6e968b0c9fdaccd93e44bebf)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995030#comment-14995030
 ] 

Hudson commented on HBASE-14759:


SUCCESS: Integrated in HBase-1.2-IT #269 (See 
[https://builds.apache.org/job/HBase-1.2-IT/269/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 457fa656bcc3904758889019fac8ecb191161e7d)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995107#comment-14995107
 ] 

Hudson commented on HBASE-14759:


FAILURE: Integrated in HBase-1.1-JDK7 #1589 (See 
[https://builds.apache.org/job/HBase-1.1-JDK7/1589/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 55314ecb994529576f7d6aa842d11d8f7ac52544)
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Hudson (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14995111#comment-14995111
 ] 

Hudson commented on HBASE-14759:


FAILURE: Integrated in HBase-1.1-JDK8 #1676 (See 
[https://builds.apache.org/job/HBase-1.1-JDK8/1676/])
HBASE-14759 Avoid using Math.abs when selecting SyncRunner in FSHLog (zhangduo: 
rev 55314ecb994529576f7d6aa842d11d8f7ac52544)
* 
hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
* 
hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/wal/TestFSHLog.java


> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-06 Thread Enis Soztutar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14994495#comment-14994495
 ] 

Enis Soztutar commented on HBASE-14759:
---

bq. I think this will update syncRunnerIndex? Enis Soztutar
Thanks Duo. I have missed the first part of the change. 

+1 for the patch. 

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Affects Versions: 2.0.0, 1.0.2, 1.2.0, 1.1.2, 1.3.0
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Fix For: 2.0.0, 1.2.0, 1.3.0, 1.0.3, 1.1.3
>
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-04 Thread Enis Soztutar (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14990395#comment-14990395
 ] 

Enis Soztutar commented on HBASE-14759:
---

{{this.syncRunnerIndex}} does not get incremented with this patch. I am missing 
something? 

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-04 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14990744#comment-14990744
 ] 

Duo Zhang commented on HBASE-14759:
---

{code}
this.syncRunnerIndex = (this.syncRunnerIndex + 1) % this.syncRunners.length;
{code}

I think this will update syncRunnerIndex? [~enis]

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-04 Thread Ted Yu (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14989590#comment-14989590
 ] 

Ted Yu commented on HBASE-14759:


Lgtm

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-04 Thread Hadoop QA (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14989550#comment-14989550
 ] 

Hadoop QA commented on HBASE-14759:
---

{color:green}+1 overall{color}.  Here are the results of testing the latest 
attachment 
  http://issues.apache.org/jira/secure/attachment/12770569/HBASE-14759.patch
  against master branch at commit ceddec9141b658c790d2fb995c970982ab082028.
  ATTACHMENT ID: 12770569

{color:green}+1 @author{color}.  The patch does not contain any @author 
tags.

{color:green}+1 tests included{color}.  The patch appears to include 4 new 
or modified tests.

{color:green}+1 hadoop versions{color}. The patch compiles with all 
supported hadoop versions (2.4.0 2.4.1 2.5.0 2.5.1 2.5.2 2.6.0 2.6.1 2.7.0 
2.7.1)

{color:green}+1 javac{color}.  The applied patch does not increase the 
total number of javac compiler warnings.

{color:green}+1 protoc{color}.  The applied patch does not increase the 
total number of protoc compiler warnings.

{color:green}+1 javadoc{color}.  The javadoc tool did not generate any 
warning messages.

{color:green}+1 checkstyle{color}.  The applied patch does not increase the 
total number of checkstyle errors

{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 post-site goal succeeds with this patch.

{color:green}+1 core tests{color}.  The patch passed unit tests in .

Test results: 
https://builds.apache.org/job/PreCommit-HBASE-Build/16385//testReport/
Release Findbugs (version 2.0.3)warnings: 
https://builds.apache.org/job/PreCommit-HBASE-Build/16385//artifact/patchprocess/newFindbugsWarnings.html
Checkstyle Errors: 
https://builds.apache.org/job/PreCommit-HBASE-Build/16385//artifact/patchprocess/checkstyle-aggregate.html

  Console output: 
https://builds.apache.org/job/PreCommit-HBASE-Build/16385//console

This message is automatically generated.

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Reporter: Duo Zhang
>Assignee: Duo Zhang
> Attachments: HBASE-14759.patch
>
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)


[jira] [Commented] (HBASE-14759) Avoid using Math.abs when selecting SyncRunner in FSHLog

2015-11-04 Thread Duo Zhang (JIRA)

[ 
https://issues.apache.org/jira/browse/HBASE-14759?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=14989229#comment-14989229
 ] 

Duo Zhang commented on HBASE-14759:
---

Add a simple testcase in TestFSHLog

{code}

  @Test
  public void testSyncRunnerIndexOverflow() throws IOException, 
NoSuchFieldException,
  SecurityException, IllegalArgumentException, IllegalAccessException {
final String name = "testSyncRunnerIndexOverflow";
FSHLog log =
new FSHLog(fs, FSUtils.getRootDir(conf), name, 
HConstants.HREGION_OLDLOGDIR_NAME, conf,
null, true, null, null);
Field ringBufferEventHandlerField = 
FSHLog.class.getDeclaredField("ringBufferEventHandler");
ringBufferEventHandlerField.setAccessible(true);
FSHLog.RingBufferEventHandler ringBufferEventHandler =
(FSHLog.RingBufferEventHandler) ringBufferEventHandlerField.get(log);
Field syncRunnerIndexField =
FSHLog.RingBufferEventHandler.class.getDeclaredField("syncRunnerIndex");
syncRunnerIndexField.setAccessible(true);
syncRunnerIndexField.set(ringBufferEventHandler, Integer.MAX_VALUE);
HTableDescriptor htd =
new HTableDescriptor(TableName.valueOf("t1")).addFamily(new 
HColumnDescriptor("row"));
HRegionInfo hri =
new HRegionInfo(htd.getTableName(), HConstants.EMPTY_START_ROW, 
HConstants.EMPTY_END_ROW);
MultiVersionConcurrencyControl mvcc = new MultiVersionConcurrencyControl();
addEdits(log, hri, htd, 1, mvcc);
addEdits(log, hri, htd, 1, mvcc);
  }
{code}

It will fail with
{noformat}
org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: On sync
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1782)
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1)
at 
com.lmax.disruptor.BatchEventProcessor.run(BatchEventProcessor.java:128)
at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.apache.hadoop.hbase.regionserver.wal.DamagedWALException: Failed 
offering sync
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1776)
... 5 more
Caused by: java.lang.ArrayIndexOutOfBoundsException: -3
at 
org.apache.hadoop.hbase.regionserver.wal.FSHLog$RingBufferEventHandler.onEvent(FSHLog.java:1772)
... 5 more
{noformat}

> Avoid using Math.abs when selecting SyncRunner in FSHLog
> 
>
> Key: HBASE-14759
> URL: https://issues.apache.org/jira/browse/HBASE-14759
> Project: HBase
>  Issue Type: Bug
>  Components: wal
>Reporter: Duo Zhang
>
> {code:title=FSHLog.java}
> int index = Math.abs(this.syncRunnerIndex++) % this.syncRunners.length;
>   try {
> this.syncRunners[index].offer(sequence, this.syncFutures, 
> this.syncFuturesCount);
>   } catch (Exception e) {
> // Should NEVER get here.
> requestLogRoll();
> this.exception = new DamagedWALException("Failed offering sync", 
> e);
>   }
> {code}
> Math.abs will return Integer.MIN_VALUE if you pass Integer.MIN_VALUE in since 
> the actual absolute value of Integer.MIN_VALUE is out of range.
> I think {{this.syncRunnerIndex++}} will overflow eventually if we keep the 
> regionserver running for enough time.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)