No write has been do on this connection
The problem arose for several days. Dozens of times a day in the log no write has beendo on this connection,
So study for several days.
The operation of the program is to throw GetLastError when a problem occurs.
And then went through the GetLastError method, W has a few values,
1: Any one server can finish the next operation.
2:2 units must be completed.
0: Do not consider write completion or not, continue to write operations.
One more value is majority. After viewing the official documentation, I understand that values greater than 2 are majority. Here's an official explanation.
These are the official explanations for several parameters.
There is also a value of j,true,false,true to turn on logging.
For example, w:1,j:true, you must have a server write operation completed, and write the operation into journal before you can proceed to the next step.
As you can see in the figure, you must finish writing journal to return a valid value.
From the Red Line section, it can be seen that majority will replace the number greater than 2,
Back to the topic, reported that mistake, and finally found that the issue of the version. We can verify that, on 2.2, a remove operation on an empty collection, and then immediately enter GetLastError (W:1), will return the error of the problem, but on 2.6, it will not.