Skip to content

Commit b47adb7

Browse files
committed
PHPC-1415: Disable retryWrites for sharded cluster without replica set
Without replica set shards, retryable writes cannot be used. It must be explicitly disabled because the driver cannot detect this by its direct communication with mongos nodes.
1 parent d0e4d89 commit b47adb7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

.travis.scripts/setup_mo.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
case $DEPLOYMENT in
1010
SHARDED_CLUSTER)
1111
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/sharded_clusters/cluster.json start > /tmp/mo-result.json
12-
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri;' > /tmp/uri.txt
12+
cat /tmp/mo-result.json | tail -n 1 | php -r 'echo json_decode(file_get_contents("php://stdin"))->mongodb_uri, "/?retryWrites=false";' > /tmp/uri.txt
1313
;;
1414
SHARDED_CLUSTER_RS)
1515
${TRAVIS_BUILD_DIR}/.travis.scripts/mo.sh ${TRAVIS_BUILD_DIR}/scripts/presets/travis/sharded_clusters/cluster_replset.json start > /tmp/mo-result.json

0 commit comments

Comments
 (0)