New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

mongodb-core

Package Overview
Dependencies
Maintainers
3
Versions
177
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mongodb-core - npm Package Compare versions

Comparing version 3.1.0-beta3 to 3.1.0-beta4

1

lib/topologies/mongos.js

@@ -898,2 +898,3 @@ 'use strict';

// increment and assign txnNumber
options.willRetryWrite = true;
options.session.incrementTransactionNumber();

@@ -900,0 +901,0 @@

@@ -1234,2 +1234,3 @@ 'use strict';

options.session.incrementTransactionNumber();
options.willRetryWrite = willRetryWrite;
}

@@ -1236,0 +1237,0 @@

11

lib/wireprotocol/3_2_support.js

@@ -21,4 +21,5 @@ 'use strict';

* @param {ClientSession} session the session tracking transaction state
* @param {boolean} [isRetryableWrite=false] if true, will be decorated for retryable writes
*/
function decorateWithTransactionsData(command, session) {
function decorateWithTransactionsData(command, session, isRetryableWrite) {
if (!session) {

@@ -30,3 +31,5 @@ return;

const serverSession = session.serverSession;
if (serverSession.txnNumber) {
const inTransaction = session.inTransaction();
if (serverSession.txnNumber && (isRetryableWrite || inTransaction)) {
command.txnNumber = BSON.Long.fromNumber(serverSession.txnNumber);

@@ -36,3 +39,3 @@ }

// now try to apply tansaction-specific data
if (!session.inTransaction()) {
if (!inTransaction) {
return;

@@ -109,3 +112,3 @@ }

// optionally decorate command with transactions data
decorateWithTransactionsData(writeCommand, options.session);
decorateWithTransactionsData(writeCommand, options.session, options.willRetryWrite);

@@ -112,0 +115,0 @@ // Options object

{
"name": "mongodb-core",
"version": "3.1.0-beta3",
"version": "3.1.0-beta4",
"description": "Core MongoDB driver functionality, no bells and whistles and meant for integration not end applications",

@@ -5,0 +5,0 @@ "main": "index.js",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc