[
https://issues.apache.org/jira/browse/HBASE-12062?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14144978#comment-14144978
]
Andrew Purtell commented on HBASE-12062:
----------------------------------------
+1
Is this hunk better?
{code}
diff --git
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
index 56d8349..bae71fc 100644
---
a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
+++
b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/wal/FSHLog.java
@@ -1221,7 +1221,7 @@ class FSHLog implements HLog, Syncable {
void offer(final long sequence, final SyncFuture [] syncFutures, final int
syncFutureCount) {
// Set sequence first because the add to the queue will wake the thread
if sleeping.
this.sequence = sequence;
- for (int i = 0; i < syncFutureCount; i++)
this.syncFutures.add(syncFutures[i]);
+ this.syncFutures.addAll(Arrays.asList(syncFutures).subList(0,
syncFutureCount));
}
/**
{code}
> Fix usage of Collections.toArray
> --------------------------------
>
> Key: HBASE-12062
> URL: https://issues.apache.org/jira/browse/HBASE-12062
> Project: HBase
> Issue Type: Sub-task
> Reporter: Elliott Clark
> Assignee: Elliott Clark
> Attachments: 0001-HBASE-12062-Fix-usage-of-Collections.toArray.patch
>
>
> Need to give the correctly sized array when possible.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)