You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@hbase.apache.org by "Jieshan Bean (JIRA)" <ji...@apache.org> on 2012/12/29 02:00:59 UTC

[jira] [Resolved] (HBASE-7324) Archive the logs instead of deletion after distributed splitting

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

Jieshan Bean resolved HBASE-7324.
---------------------------------

    Resolution: Invalid
    
> 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