Add more trace logging to gateway translog recovery
This commit is contained in:
parent
da11bf4c1d
commit
3b585e5a5e
|
@ -250,12 +250,13 @@ public class LocalIndexShardGateway extends AbstractIndexShardComponent implemen
|
|||
|
||||
final Set<String> typesToUpdate = Sets.newHashSet();
|
||||
try {
|
||||
logger.trace("recovering translog file: {} length: {}", recoveringTranslogFile, Files.size(recoveringTranslogFile));
|
||||
TranslogStream stream = TranslogStreams.translogStreamFor(recoveringTranslogFile);
|
||||
try {
|
||||
in = stream.openInput(recoveringTranslogFile);
|
||||
} catch (TruncatedTranslogException e) {
|
||||
// file is empty or header has been half-written and should be ignored
|
||||
logger.trace("ignoring truncation exception, the translog is either empty or half-written ([{}])", e.getMessage());
|
||||
logger.trace("ignoring truncation exception, the translog is either empty or half-written", e);
|
||||
}
|
||||
while (true) {
|
||||
if (in == null) {
|
||||
|
@ -269,11 +270,11 @@ public class LocalIndexShardGateway extends AbstractIndexShardComponent implemen
|
|||
operation = stream.read(in);
|
||||
} catch (EOFException e) {
|
||||
// ignore, not properly written the last op
|
||||
logger.trace("ignoring translog EOF exception, the last operation was not properly written ([{}])", e.getMessage());
|
||||
logger.trace("ignoring translog EOF exception, the last operation was not properly written", e);
|
||||
break;
|
||||
} catch (IOException e) {
|
||||
// ignore, not properly written last op
|
||||
logger.trace("ignoring translog IO exception, the last operation was not properly written ([{}])", e.getMessage());
|
||||
logger.trace("ignoring translog IO exception, the last operation was not properly written", e);
|
||||
break;
|
||||
}
|
||||
try {
|
||||
|
|
Loading…
Reference in New Issue