In spring, I have the following mongo configurations configuration:
<mongo:mongo host="${db.hostname}" >
<mongo:options
connections-per-host="40"
threads-allowed-to-block-for-connection-multiplier="1500"
connect-timeout="15000"
auto-connect-retry="true"
socket-timeout="60000"
write-number="1"
write-fsync="false"/>
</mongo:mongo>
What I want to know is the different options of the recording numbers, which are related to the recording problem, like no one else, normal, safe, etc.
Can we assume that the display of the record number in writeconcern is indicated below?
NONE: -1
NORMAL: 0
SAFE: 1 (default)
FSYNC_SAFE: 2
REPLICAS_SAFE: 3
JOURNAL_SAFE: 4
MAJORITY: 5
The following link provided good help for setting mongo parameters in spring, but not enough for record number values:
How to configure the MongoDB Java driver for use in MongoOptions?
source
share