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

Jesse Yates commented on HBASE-7947:
------------------------------------

Nope, looks like its actually a bug. The relevant code is from 
CompactSplitThread, lines 206-233:
{code}
  @Override
  public synchronized List<CompactionRequest> requestCompaction(final HRegion 
r, final String why,
      int p, List<CompactionRequest> requests) throws IOException {
    // not a special compaction request, so make our own list
    List<CompactionRequest> ret;
    if (requests == null) {
      ret = new ArrayList<CompactionRequest>(r.getStores().size());
      for (Store s : r.getStores().values()) {
        ret.add(requestCompaction(r, s, why, p, null));
      }
    } else {
      ret = new ArrayList<CompactionRequest>(requests.size());
      for (CompactionRequest request : requests) {
        requests.add(requestCompaction(r, request.getStore(), why, p, request));
      }
    }
    return ret;
  }
{code}

Patch coming momentarily
                
> Custom compaction requests should have test for adding to wrong list
> --------------------------------------------------------------------
>
>                 Key: HBASE-7947
>                 URL: https://issues.apache.org/jira/browse/HBASE-7947
>             Project: HBase
>          Issue Type: Bug
>            Reporter: Jesse Yates
>            Assignee: Jesse Yates
>             Fix For: 0.95.0, 0.96.0
>
>
> This came from backporting HBASE-7725 to 0.94. Essentially, the created 
> compaction requests were added to the wrong list, resulting in concurrent 
> modifications exceptions and incorrect return values when used in practice. 
> The code is fine in 0.95/trunk, but should include the same added test to 
> catch a possible regression.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to