Wtimeout - What happens if it is exceeded, to the data written?

Due to the nature of network, even if you receive a timeout error, it simply means the the servers fail to respond within that time and nothing else. The writes may or may not succeed at that time, and may eventually succeed.

The application will not know that unless some certain conditions are met (e.g. unique index in place).

To make sure all happen or nothing happens, you have to use a transaction. With transaction semantics, once you get an abort error, you know the changes will be eventually rolled back, and if you successfully commit it, you know the changes will be eventually there.

1 Like