Skip to content

Commit b50b882

Browse files
authored
Expose APIs needed by flush during translog replay (#132960)
1 parent f627210 commit b50b882

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

server/src/main/java/org/elasticsearch/index/engine/InternalEngine.java

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -620,6 +620,10 @@ public void skipTranslogRecovery() {
620620
pendingTranslogRecovery.set(false); // we are good - now we can commit
621621
}
622622

623+
protected boolean pendingTranslogRecovery() {
624+
return pendingTranslogRecovery.get();
625+
}
626+
623627
private void recoverFromTranslogInternal(
624628
TranslogRecoveryRunner translogRecoveryRunner,
625629
long recoverUpToSeqNo,
@@ -3133,7 +3137,7 @@ protected Map<String, String> getCommitExtraUserData(final long localCheckpoint)
31333137
return Collections.emptyMap();
31343138
}
31353139

3136-
final void ensureCanFlush() {
3140+
protected void ensureCanFlush() {
31373141
// translog recovery happens after the engine is fully constructed.
31383142
// If we are in this stage we have to prevent flushes from this
31393143
// engine otherwise we might loose documents if the flush succeeds

0 commit comments

Comments
 (0)