-
Type: Bug
-
Resolution: Fixed
-
Priority: Minor - P4
-
Affects Version/s: 3.0.10
-
Component/s: Native
-
Empty show more show less
when I run the following node script:
#!/usr/bin/env node 'use strict'; const env = require('/Users/lineus/.env'); const { MongoClient } = require('mongodb'); const sharable = env.ATLASSRV .replace(/\/[^:]+:[^@]+@/, '//**:**@') .replace(/cl[^:]+mon/, 'cluster.mon'); const pkg = require.resolve('mongodb').replace(/\/[^/]*$/, '/package.json'); const ver = require(pkg).version; async function run() { console.log(`version: ${ver}`); console.log(`conn string: ${sharable}`); const client = await MongoClient.connect(env.ATLASSRV); const db = client.db('gh-6610'); await db.dropDatabase(); await db.collection('tests').insert({ name: 'Billy' }); let found = await db.collection('tests').findOne({}); console.log(found); await db.collection('tests').remove({ _id: found._id }) .catch((e) => { console.error(e.message); return client.close(); }); } run();
I get the following output:
Unable to find source-code formatter for language: shell. Available languages are: actionscript, ada, applescript, bash, c, c#, c++, cpp, css, erlang, go, groovy, haskell, html, java, javascript, js, json, lua, none, nyan, objc, perl, php, python, r, rainbow, ruby, scala, sh, sql, swift, visualbasic, xml, yaml
issues: ./6610_native.js version: 3.0.10 conn string: mongodb+srv://**:**@cluster.mongodb.net/test?retryWrites=true { _id: 5b3247c7bcf86f208bdc5990, name: 'Billy' } Cannot use (or request) retryable writes with limit=0 issues:
I noticed NODE-1513 says that there changes coming to retryWrites in the next driver version but I wasn't sure if those changes apply to this code. It looks like the spec doesn't mention `remove` as being supported by retryWrites. Going forward will there be any effort to make remove compatible with retryWrites?