Add up-to-date javadocs on Translog#syncNeeded
This commit is contained in:
parent
64d0d9184d
commit
8f798f1231
|
@ -541,6 +541,9 @@ public class Translog extends AbstractIndexShardComponent implements IndexShardC
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Returns <code>true</code> if an fsync is required to ensure durability of the translogs operations or it's metadata.
|
||||||
|
*/
|
||||||
public boolean syncNeeded() {
|
public boolean syncNeeded() {
|
||||||
try (ReleasableLock lock = readLock.acquire()) {
|
try (ReleasableLock lock = readLock.acquire()) {
|
||||||
return current.syncNeeded();
|
return current.syncNeeded();
|
||||||
|
|
|
@ -209,7 +209,8 @@ public class TranslogWriter extends BaseTranslogReader implements Closeable {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* returns true if there are buffered ops
|
* Returns <code>true</code> if there are buffered operations that have not been flushed and fsynced to disk or if the latest global
|
||||||
|
* checkpoint has not yet been fsynced
|
||||||
*/
|
*/
|
||||||
public boolean syncNeeded() {
|
public boolean syncNeeded() {
|
||||||
return totalOffset != lastSyncedCheckpoint.offset || globalCheckpointSupplier.getAsLong() != lastSyncedCheckpoint.globalCheckpoint;
|
return totalOffset != lastSyncedCheckpoint.offset || globalCheckpointSupplier.getAsLong() != lastSyncedCheckpoint.globalCheckpoint;
|
||||||
|
|
Loading…
Reference in New Issue