hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jieshan Bean (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HBASE-7324) Archive the logs instead of deletion after distributed splitting
Date Sat, 29 Dec 2012 01:00:59 GMT

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

Jieshan Bean commented on HBASE-7324:
-------------------------------------

Sorry, I misread the code. It's not a problem.
                
> Archive the logs instead of deletion after distributed splitting
> ----------------------------------------------------------------
>
>                 Key: HBASE-7324
>                 URL: https://issues.apache.org/jira/browse/HBASE-7324
>             Project: HBase
>          Issue Type: Bug
>          Components: wal
>    Affects Versions: 0.94.3, 0.96.0
>            Reporter: Jieshan Bean
>
> We should always move the logs to .oldlogs instead of deleting them directly. 
> The negative effect of this bug may cause data-loss if we enabled replication.
> The below code is extracted from SplitLogManager#splitLogDistributed:
> {code}
> for(Path logDir: logDirs){
>       status.setStatus("Cleaning up log directory...");
>       try {
>         if (fs.exists(logDir) && !fs.delete(logDir, false)) {
>           LOG.warn("Unable to delete log src dir. Ignoring. " + logDir);
>         }
>       } catch (IOException ioe) {
>         FileStatus[] files = fs.listStatus(logDir);
>         if (files != null && files.length > 0) {
>           LOG.warn("returning success without actually splitting and " + 
>               "deleting all the log files in path " + logDir);
>         } else {
>           LOG.warn("Unable to delete log src dir. Ignoring. " + logDir, ioe);
>         }
>       }
>       tot_mgr_log_split_batch_success.incrementAndGet();
>     }
> {code}

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

Mime
View raw message