Skip to content

SeaweedFS is a distributed storage system for object storage (S3), file systems, Iceberg table buckets, and Lance vector buckets, designed to handle billions of files with O(1) disk access and effortless horizontal scaling.

wait for data

chrislu054d0b348785
diff --git a/weed/util/log_buffer/log_read.go b/weed/util/log_buffer/log_read.go
index d7ca471552..0354f0e7f1 100644
--- a/weed/util/log_buffer/log_read.go
+++ b/weed/util/log_buffer/log_read.go
@@ -66,16 +66,20 @@ func (logBuffer *LogBuffer) LoopProcessLogData(readerName string, startPosition
isDone = true
return
}
- if waitForDataFn() {
- continue
- } else {
- isDone = true
- return
+ lastTsNs := logBuffer.LastTsNs
+ for lastTsNs == logBuffer.LastTsNs {
+ if waitForDataFn() {
+ continue
+ } else {
+ isDone = true
+ return
+ }
}
if logBuffer.IsStopping() {
isDone = true
return
}
+ continue
}
buf := bytesBuf.Bytes()