factor out the code that processes an oplog op, and buffer insert ops #311