File tree 1 file changed +12
-0
lines changed
1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -226,6 +226,14 @@ func (sync *OplogSyncer) startBatcher() {
226
226
filterFlag := false // marks whether previous log is filter
227
227
228
228
nimo .GoRoutineInLoop (func () {
229
+ /*
230
+ * judge self is master?
231
+ */
232
+ if ! quorum .IsMaster () {
233
+ utils .YieldInMs (DurationTime )
234
+ return
235
+ }
236
+
229
237
// As much as we can batch more from logs queue. batcher can merge
230
238
// a sort of oplogs from different logs queue one by one. the max number
231
239
// of oplogs in batch is limited by AdaptiveBatchingMaxSize
@@ -278,6 +286,10 @@ func (sync *OplogSyncer) startBatcher() {
278
286
} else {
279
287
// if log is nil, check whether filterLog is empty
280
288
if filterLog == nil {
289
+ // no need to update
290
+ return
291
+ } else if filterLog .Timestamp <= sync .ckptManager .GetInMemory ().Timestamp {
292
+ // no need to update
281
293
return
282
294
} else {
283
295
now := time .Now ()
You can’t perform that action at this time.
0 commit comments