Skip to content

Commit 0ba4a45

Browse files
committed
[kv] include hidden potential internal flush time in KV flush latency
1 parent 48c9c08 commit 0ba4a45

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fluss-server/src/main/java/org/apache/fluss/server/kv/prewrite/KvPreWriteBuffer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -207,6 +207,7 @@ public void truncateTo(long targetLogSequenceNumber, TruncateReason truncateReas
207207
* be flushed
208208
*/
209209
public void flush(long exclusiveUpToLogSequenceNumber) throws IOException {
210+
long start = System.nanoTime();
210211
int flushedCount = 0;
211212
for (Iterator<KvEntry> it = allKvEntries.iterator(); it.hasNext(); ) {
212213
KvEntry entry = it.next();
@@ -236,7 +237,6 @@ public void flush(long exclusiveUpToLogSequenceNumber) throws IOException {
236237
}
237238
// flush to underlying kv tablet
238239
if (flushedCount > 0) {
239-
long start = System.nanoTime();
240240
kvBatchWriter.flush();
241241
flushCount.inc();
242242
flushLatencyHistogram.update((System.nanoTime() - start) / 1_000_000);

0 commit comments

Comments
 (0)