Why does the connector setup test fail and report I don't have 24 hours worth of oplogs?
There is no variable to control the "length" of time in Mongo versions below 4.4; only the size. You must extrapolate the length of time based on the size.
The connector setup tests run these two commands to determine if 24 hours of oplog are available:
We compare the two timestamps to determine if 24 hours worth of logs are available.
New in version 4.4: MongoDB 4.4 supports specifying a minimum oplog retention period in hours, where MongoDB only removes an oplog entry if:
- The oplog has reached the maximum configured size, and
- The oplog entry is older than the configured number of hours.
The oldest and newest oplog entry is not 24 hours different.