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

Ted Yu commented on HBASE-9390:
-------------------------------

Patch 2 looks good overall.
{code}
+   * @return list of mutations to be replayed
+   * @throws IOException
+   */
+  public List<Pair<MutationType, Mutation>> getReplayMutations(List<WALEntry> 
entries,
+      CellScanner cells, UUID clusterId, List<Pair<HLogKey, WALEdit>> 
logEntries)
{code}
getReplayMutations() can be package private.
javadoc for @return should be modified - list of Pairs is returned.
{code}
+      List<Pair<MutationType, Mutation>> editMutations =
+          new ArrayList<Pair<MutationType, Mutation>>();
{code}
The above List (inside outer for loop) can be constructed once outside outer 
for loop and cleared for each iteration.
{code}
+        logEntries.add(new Pair<HLogKey, WALEdit>(logKey, val));
+        if (coprocessorHost.preWALRestore(this.getRegionInfo(), logKey, val)) {
+          // if bypass this log entry, ignore it ...
+          continue;
+        }
{code}
Looks like logEntries.add() call should be moved after 'if 
(coprocessorHost.preWALRestore())' statement.
                
> coprocessors observers are not called during a recovery with the new log 
> replay algorithm
> -----------------------------------------------------------------------------------------
>
>                 Key: HBASE-9390
>                 URL: https://issues.apache.org/jira/browse/HBASE-9390
>             Project: HBase
>          Issue Type: Bug
>          Components: Coprocessors, MTTR
>    Affects Versions: 0.95.2
>            Reporter: Nicolas Liochon
>            Assignee: Jeffrey Zhong
>         Attachments: copro.patch, hbase-9390-part2.patch, hbase-9390.patch, 
> hbase-9390-v2.patch
>
>
> See the patch to reproduce the issue: If we activate log replay we don't have 
> the events on WAL restore.
> Pinging [~jeffreyz], we discussed this offline.

--
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