[ 
https://issues.apache.org/jira/browse/HBASE-2667?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

stack updated HBASE-2667:
-------------------------

    Attachment: 2667.txt

The test checked sequenceid ordering in the produced split.  They were being 
written in the reverse order -- newest first.  The reconstruction log over in 
HStore expects to read the edits oldest through to newest so changed how we 
make the recovered edits files.

Here is the change:

{code}
@@ -1552,10 +1552,11 @@ public class HLog implements HConstants, Syncable {
         try {
           int editsCount = 0;
           WriterAndPath wap = logWriters.get(region);
-          for (ListIterator<Entry> iterator = entries.listIterator();
-               iterator.hasNext();) {
-            Entry logEntry =  iterator.next();
-
+          // We put edits onto the Stack ordered oldest sequence id to newest.
+          // Pop them off starting with the oldest.
+          for (ListIterator<Entry> iterator = 
entries.listIterator(entries.size());
+               iterator.hasPrevious();) {
+            Entry logEntry =  iterator.previous();
{code}

> TestHLog.testSplit failing in trunk
> -----------------------------------
>
>                 Key: HBASE-2667
>                 URL: https://issues.apache.org/jira/browse/HBASE-2667
>             Project: HBase
>          Issue Type: Bug
>            Reporter: stack
>            Assignee: stack
>         Attachments: 2667-prelim.txt, 2667.txt
>
>
> Build is broke because this test won't pass.
> Seems to be two issues at least:
> 1. we need to change the test so it keeps logs in one subdir, archives in 
> another and split products in yet another as per regionserver.  New split 
> code does cleanup of old logs dir if successful.  In this test it was 
> removing the created splits so when verify went to run, the log no longer 
> existed
> 2. The verify of splits tests that sequence numbers are in order.  They don't 
> seem to be (the assertion failure was masked by a close reader exception).

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to