When testing I set pitr.oplogSpanMin=5 (original value is 10) and sleep 10 then rollback pitr.oplogSpanMin=10, some times the oplog can upload immediately, but sometimes I got errors as following
streaming oplog: epoch mismatch. Got sleep in {1651759210 6}, woke up in {1651804591 1}. Too old
2022-05-06T02:40:52.000+0000 E [pitr] streaming oplog: epoch mismatch. Got sleep in {1651759210 6}, woke up in {1651804591 1}. Too old for that stuff.
2022-05-06T02:35:50.000+0000 I starting PITR routine
2022-05-06T02:35:51.000+0000 I node: rs0/xx-mongo-mongodb-0.xx-mongo-mongodb-headless.xx.svc.cluster.local:27017
2022-05-06T02:35:51.000+0000 I listening for the commands
2022-05-06T02:35:51.000+0000 D [pitr] stale lock: {PITR incremental backup rs0 xx-mongo-mongodb-0.xx-mongo-mongodb-headless.xx.svc.cluster.local:27017 0xc0003cd6e0}
2022-05-06T02:35:51.000+0000 D [pitr] start_catchup
2022-05-06T02:35:51.000+0000 D [pitr] lastTS set to {1651803947 1} 2022-05-06T02:25:47
2022-05-06T02:35:52.000+0000 I [pitr] streaming started from 2022-05-06 02:25:47 +0000 UTC / 1651803947
2022-05-06T02:35:52.000+0000 D [pitr] start_ok
2022-05-06T02:36:32.000+0000 I got command resync <ts: 1651804591>
2022-05-06T02:36:32.000+0000 I got epoch {1651804591 1}
2022-05-06T02:36:32.000+0000 D [resync] get lock: another operation is running: PITR incremental backup ''
2022-05-06T02:36:32.000+0000 D [resync] lock not acquired
2022-05-06T02:40:52.000+0000 D [pitr] set pitr span to 5m0s
2022-05-06T02:40:52.000+0000 I [pitr] got wake_up signal
2022-05-06T02:40:52.000+0000 E [pitr] streaming oplog: epoch mismatch. Got sleep in {1651759210 6}, woke up in {1651804591 1}. Too old for that stuff.
2022-05-06T02:41:07.000+0000 D [pitr] set pitr span to 10m0s
2022-05-06T03:00:00.000+0000 I got command deletePitr <ts: 1651806000>
2022-05-06T03:00:01.000+0000 I got epoch {1651804591 1}
Another way can I trigger oplog upload immediately?