Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Invalid
-
0.94.3, 0.95.2
-
None
-
None
Description
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:
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(); }