Refactor observe dedup; support it for oplog.