fix not all logs are submitted error check

This commit is contained in:
Christopher Homberger
2026-02-20 15:22:00 +01:00
parent f4b8e7605c
commit 6d2ce82645

View File

@ -296,10 +296,11 @@ func (r *Reporter) ReportLog(noMore bool) error {
r.stateMu.Lock()
r.logRows = r.logRows[ack-r.logOffset:]
submitted := r.logOffset + len(rows)
r.logOffset = ack
r.stateMu.Unlock()
if noMore && ack < r.logOffset+len(rows) {
if noMore && ack < submitted {
return fmt.Errorf("not all logs are submitted")
}