There was an error while loading. Please reload this page.
v2.4.6版本开始,MongoShake通过incr_sync.target_delay参数支持延迟同步的功能,类似MongoDB主从同步的延迟同步SlaveDelay。
incr_sync.target_delay
例如,设置目的端延迟同步为源端滞后30分钟,单位为秒: incr_sync.target_delay = 1800 默认设置0表示不启用。
incr_sync.target_delay = 1800
查看当前配置:
vinllen-ali@ ~/code/MongoShake$ curl 127.0.0.1:9100/sentinel {"OplogDump":0,"DuplicatedDump":false,"Pause":false,"TPS":0,"TargetDelay":-1}
可以看到TargetDelay默认为-1(小于等于0表示不启用),动态调整延迟为120秒:
vinllen-ali@ ~/code/MongoShake$ curl -X POST --data '{"TargetDelay":0}' 127.0.0.1:9100/sentinel/options {"sentinel":"success"}