The process of statically loading data into a collection may occur.
Suppose you set up a task: Thousands of updates in MongoDB, start the task quickly, terminate all update operations, but still find that new update tasks are constantly appearing, even though the task has stopped.
The reason: If you use non-responsive write (Unacknowledge write) to load data, the application can trigger write operations faster than MONGODB processing. If MongoDB is prepared, this batch of writes will accumulate in the socket cache (socket buffer) in the operating system. At this point, after terminating MongoDB's ongoing write operation, MongoDB begins processing the write operation of the cache. Because this batch of operations has been received by MongoDB, but has not been processed for the time being.
The best way to avoid this phantom operation is to use the answer write, that is, each write operation waits until the last write completes, rather than the next operation when the last write enters the buffer.
MongoDB Ghost operation to avoid