From b50b3afb0ee4f83cd67b77e387a3956b8d17324f Mon Sep 17 00:00:00 2001 From: Andrei Matei Date: Tue, 2 Feb 2021 17:34:13 -0500 Subject: [PATCH] kvserver: add a comment Hint at the reason why a rangefeed checkpoint with an empty resolved timestamp is published. This revives an old comment delete in #33557. Release note: None --- pkg/kv/kvserver/rangefeed/processor.go | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkg/kv/kvserver/rangefeed/processor.go b/pkg/kv/kvserver/rangefeed/processor.go index 0d56a46f0e63..0aa6b9163640 100644 --- a/pkg/kv/kvserver/rangefeed/processor.go +++ b/pkg/kv/kvserver/rangefeed/processor.go @@ -249,9 +249,11 @@ func (p *Processor) run( // Publish an updated filter that includes the new registration. p.filterResC <- p.reg.NewFilter() - // Immediately publish a checkpoint event to the registry. This will be - // the first event published to this registration after its initial - // catch-up scan completes. + // Immediately publish a checkpoint event to the registry. This will be the first event + // published to this registration after its initial catch-up scan completes. The resolved + // timestamp might be empty but the checkpoint event is still useful to indicate that the + // catch-up scan has completed. This allows clients to rely on stronger ordering semantics + // once they observe the first checkpoint event. r.publish(p.newCheckpointEvent()) // Run an output loop for the registry.