diff options
author | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-26 11:25:50 -0500 |
---|---|---|
committer | Scott Hernandez <scotthernandez@gmail.com> | 2014-02-26 12:11:30 -0500 |
commit | a56653e1df978f68b887788b39d053e3f88bb0ea (patch) | |
tree | 4ba0d7d3114f6edc4a924a6ed40b42632bfe3736 /src/mongo/shell/bulk_api.js | |
parent | f4c7d400c8f938374474a37cde54e36168e60b26 (diff) | |
download | mongo-a56653e1df978f68b887788b39d053e3f88bb0ea.tar.gz |
SERVER-12786: add shell writeMode option
Diffstat (limited to 'src/mongo/shell/bulk_api.js')
-rw-r--r-- | src/mongo/shell/bulk_api.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/mongo/shell/bulk_api.js b/src/mongo/shell/bulk_api.js index 21c5ce1e232..6418633954e 100644 --- a/src/mongo/shell/bulk_api.js +++ b/src/mongo/shell/bulk_api.js @@ -913,7 +913,8 @@ var _bulk_api_module = (function() { for(var i = 0; i < batches.length; i++) { // Execute the batch - if(useWriteCommands) { + if(collection.getMongo().hasWriteCommands() && + collection.getMongo().writeMode() == "commands") { executeBatch(batches[i]); } else { executeBatchWithLegacyOps(batches[i]); |