I am using change stream through Mongo Source Connector. Suddenly, the connector has made continuous logs like below and stopped working:
INFO An exception occurred when trying to get the next item from the Change Stream: Query failed with error code 286 and error message 'Error on remote shard **.***.**.**:***** :: caused by :: Resume of change stream was not possible, as the resume point may no longer be in the oplog.' on server **.***.**.**:***** (com.mongodb.kafka.connect.source.MongoSourceTask:597)
I got some answer like “Increase the oplog size!” after googling, but I want to know more:
- I guess, this issue could be seen even after I increase the oplog size again. So I think increasing the oplog size is not that ultimate solution.
- (Let alone the reason of the issue,) How can I resume(restart) the mongo source connector to work again? It doesn’t produce any Kafka message now…
NOTE: My mongo collections have been sharded.