Note that for `TimeWindow` as we stated in javadoc ` its end timestamp as exclusive boundary` the current logic that `mergedWindow.end() <= closeTime` is considered late looks good to me.
Regarding whether we should use `closeTime - mergedWindow.end() + 1` or just `closeTime - mergedWindow.end()`, I admit the 1ms seems a bit unnatural but from monitoring purposes I think it may be better aligned with `lateRecordDropSensor`: think, if a users saw `lateRecordDropSensor` is non-zero but `recordLatenessSensor` is 0. [ Full content available at: https://github.com/apache/kafka/pull/5742 ] This message was relayed via gitbox.apache.org for devnull@infra.apache.org