Currently, there is no contract in which order the oplog buffer should get shutdown relative to oplog fetcher (producer) and oplog applier(consumer) component. This can lead to some undesirable behavior, especially for OplogBufferCollection.
Consider this below case,
1) A service/application uses a temp collection as an oplog buffer,
2) oplog buffer shutdown gets called which leads to dropping of temp collection.
3) Now, oplog fetcher tries to insert some documents into the buffer collection via write_ops_exec::performInserts(). To be noted, performInserts() will create the collection if the collection is missing before inserting documents. so, now a new non-temporary collection gets created as performInserts() has no access to oplog buffer options
Second minor consequence, it can unnecessarily make oplog applier to wait for data.
P.S: The case that I mentioned here is not possible in the current code implementation. The ticket is to lay out the safety rules for oplog buffer.