@@ -121,13 +121,13 @@ type Verifier struct {
121121 metaDBName string
122122 srcStartAtTs * primitive.Timestamp
123123
124- mux sync.RWMutex
125- changeStreamRunning bool
126- changeStreamFinalTsChan chan primitive.Timestamp
127- changeStreamErrChan chan error
128- changeStreamDoneChan chan struct {}
129- lastChangeEventTime * primitive.Timestamp
130- writesOffTimestamp * primitive.Timestamp
124+ mux sync.RWMutex
125+ changeStreamRunning bool
126+ changeStreamWritesOffTsChan chan primitive.Timestamp
127+ changeStreamErrChan chan error
128+ changeStreamDoneChan chan struct {}
129+ lastChangeEventTime * primitive.Timestamp
130+ writesOffTimestamp * primitive.Timestamp
131131
132132 readConcernSetting ReadConcernSetting
133133
@@ -137,6 +137,8 @@ type Verifier struct {
137137 globalFilter map [string ]any
138138
139139 pprofInterval time.Duration
140+
141+ verificationStatusCheckInterval time.Duration
140142}
141143
142144// VerificationStatus holds the Verification Status
@@ -187,19 +189,21 @@ func NewVerifier(settings VerifierSettings) *Verifier {
187189 }
188190
189191 return & Verifier {
190- phase : Idle ,
191- numWorkers : NumWorkers ,
192- readPreference : readpref .Primary (),
193- partitionSizeInBytes : 400 * 1024 * 1024 ,
194- failureDisplaySize : DefaultFailureDisplaySize ,
195- changeStreamFinalTsChan : make (chan primitive.Timestamp ),
196- changeStreamErrChan : make (chan error ),
197- changeStreamDoneChan : make (chan struct {}),
198- readConcernSetting : readConcern ,
192+ phase : Idle ,
193+ numWorkers : NumWorkers ,
194+ readPreference : readpref .Primary (),
195+ partitionSizeInBytes : 400 * 1024 * 1024 ,
196+ failureDisplaySize : DefaultFailureDisplaySize ,
197+ changeStreamWritesOffTsChan : make (chan primitive.Timestamp ),
198+ changeStreamErrChan : make (chan error ),
199+ changeStreamDoneChan : make (chan struct {}),
200+ readConcernSetting : readConcern ,
199201
200202 // This will get recreated once gen0 starts, but we want it
201203 // here in case the change streams gets an event before then.
202204 eventRecorder : NewEventRecorder (),
205+
206+ verificationStatusCheckInterval : 15 * time .Second ,
203207 }
204208}
205209
@@ -250,7 +254,7 @@ func (verifier *Verifier) WritesOff(ctx context.Context) error {
250254
251255 verifier .writesOffTimestamp = & finalTs
252256
253- verifier .changeStreamFinalTsChan <- finalTs
257+ verifier .changeStreamWritesOffTsChan <- finalTs
254258 }
255259
256260 return nil
0 commit comments