update mongodb::flush according to the replica set connection