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

Jim Kellerman commented on HBASE-433:
-------------------------------------

Current situation:

If a region server crashes before it has closed any log files, then all it will 
leave is one zero length log file which will be ignored.

However, if the region server crashes after closing one or more log files, and 
the region server was starting up a region that had an old log file (and the 
region server crashed before recovering the old log file), then yes, the old 
log file would be overwritten.

Solution for current situation:

HLog.splitLog should check for the presence of an existing log file, and copy 
its contents into a new file before processing the region server's log file(s).

Future (when HDFS has appends):

The region server will never leave a zero length log file unless it has 
received no updates since it started or since it closed the most recent log 
file.

Solution for future:

If HDFS supports appends to an existing file, then splitLog should open the 
region's old log file for append or create it if it does not exist.

If HDFS does not support appends to an existing file, then the solution for the 
current situation would still work.

> region server should deleted restore log after successfull restore
> ------------------------------------------------------------------
>
>                 Key: HBASE-433
>                 URL: https://issues.apache.org/jira/browse/HBASE-433
>             Project: Hadoop HBase
>          Issue Type: Bug
>          Components: regionserver
>            Reporter: Billy Pearson
>            Priority: Trivial
>             Fix For: 0.2.0
>
>
> Currently we do not remove the restore log "oldlogfile.log" after we reopen a 
> region after a crashed region server.
> Suggestion would be to remove after we successfully flush of all the edits to 
> a mapfile
> so something like:
> replay log 
> memcache flush
> deleted log

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