Uploaded image for project: 'Node.js Driver'
  1. Node.js Driver
  2. NODE-3114

Incorrect warning: Top-level use of w, wtimeout, j, and fsync is deprecated

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.6.5
    • Affects Version/s: 3.6.4
    • Component/s: None

      When upgrading the MongoDB Node.js driver version from 3.6.3 to 3.6.4 I saw the change regarding top level usage of j (https://github.com/mongodb/node-mongodb-native/pull/2624). So, I updated my MongoClient constructor to use the new writeConcern map:

      let mongodbClient = new MongoClient({
          useUnifiedTopology: true,
          useNewUrlParser: true,
          connectTimeoutMS: 10000,
          poolSize: 10,
          writeConcern: {
              j: true
          }
      });
      

      However, I am still seeing the following warning logged every time a write occurs:

      Top-level use of w, wtimeout, j, and fsync is deprecated. Use writeConcern instead.

      I should not be seeing this warning as I updated my MongoClient constructor to the new writeConcern object right?

            Assignee:
            neal.beeken@mongodb.com Neal Beeken
            Reporter:
            justin@elasticbyte.net Justin Keller
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved: