|
@@ -2452,10 +2452,10 @@ public class InternalEngine extends Engine {
|
|
|
}
|
|
|
|
|
|
final void ensureCanFlush() {
|
|
|
- // translog recover happens after the engine is fully constructed
|
|
|
- // if we are in this stage we have to prevent flushes from this
|
|
|
+ // translog recovery happens after the engine is fully constructed.
|
|
|
+ // If we are in this stage we have to prevent flushes from this
|
|
|
// engine otherwise we might loose documents if the flush succeeds
|
|
|
- // and the translog recover fails we we "commit" the translog on flush.
|
|
|
+ // and the translog recovery fails when we "commit" the translog on flush.
|
|
|
if (pendingTranslogRecovery.get()) {
|
|
|
throw new IllegalStateException(shardId.toString() + " flushes are disabled - pending translog recovery");
|
|
|
}
|