Skip to content

Commit

Permalink
kvserver/rangefeed: change p.Register to use registration interface
Browse files Browse the repository at this point in the history
Previously, we introduced a registration interface to abstract the
implementation details of buffered and unbuffered registration. This patch
updates the p.Register function to use this interface as well.

Part of: cockroachdb#126560
Release note: none
  • Loading branch information
wenyihu6 committed Aug 19, 2024
1 parent 9765a2c commit c14f0e1
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions pkg/kv/kvserver/rangefeed/scheduled_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ func (p *ScheduledProcessor) Register(
if p.stopping {
return nil
}
if !p.Span.AsRawSpanWithNoLocals().Contains(r.span) {
if !p.Span.AsRawSpanWithNoLocals().Contains(r.getSpan()) {
log.Fatalf(ctx, "registration %s not in Processor's key range %v", r, p.Span)
}

Expand All @@ -348,8 +348,8 @@ func (p *ScheduledProcessor) Register(
if p.unregisterClient(r) {
// unreg callback is set by replica to tear down processors that have
// zero registrations left and to update event filters.
if r.unreg != nil {
r.unreg()
if f := r.getUnreg(); f != nil {
f()
}
}
}
Expand Down

0 comments on commit c14f0e1

Please sign in to comment.