Socket
Socket
Sign inDemoInstall

aerospike

Package Overview
Dependencies
Maintainers
3
Versions
135
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

aerospike - npm Package Compare versions

Comparing version 3.15.0 to 3.16.0

lib/hll.js

8

benchmarks/alerts.js

@@ -106,6 +106,6 @@ // *****************************************************************************

module.exports = {
handleAlert: handleAlert,
setupAlertSystem: setupAlertSystem,
severity: severity,
action: action
handleAlert,
setupAlertSystem,
severity,
action
}

@@ -26,5 +26,5 @@ {

"ansi-styles": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz",
"integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"requires": {

@@ -316,5 +316,5 @@ "@types/color-name": "^1.1.1",

"p-limit": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
"integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {

@@ -501,5 +501,5 @@ "p-try": "^2.0.0"

"yargs": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.0.1.tgz",
"integrity": "sha512-47i2DJb+gkLpioPBdMmnvb4QkAuyz7tLes9nCgYDXEdPf05tqjCQpUELea3MfmoomS9NKAZlZEifstKIXiASMw==",
"version": "15.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
"requires": {

@@ -516,9 +516,9 @@ "cliui": "^6.0.0",

"y18n": "^4.0.0",
"yargs-parser": "^16.1.0"
"yargs-parser": "^18.1.1"
}
},
"yargs-parser": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz",
"integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==",
"version": "18.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz",
"integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==",
"requires": {

@@ -525,0 +525,0 @@ "camelcase": "^5.0.0",

@@ -30,5 +30,5 @@ {

"winston": "^3.2.1",
"yargs": "^15.0.1"
"yargs": "^15.3.1"
},
"main": "main.js"
}

@@ -320,9 +320,9 @@ // *****************************************************************************

module.exports = {
start: start,
stop: stop,
iteration: iteration,
interval: interval,
printHistogram: printHistogram,
reportFinal: reportFinal,
parseTimeToSecs: parseTimeToSecs
start,
stop,
iteration,
interval,
printHistogram,
reportFinal,
parseTimeToSecs
}

@@ -238,3 +238,3 @@ // *****************************************************************************

var record = recordgen(k, options.binSpec)
var ops = { key: key, record: record }
var ops = { key, record }
if (writeOps > 0) {

@@ -241,0 +241,0 @@ writeOps--

@@ -7,2 +7,14 @@ # Changelog

## [3.16.0] - 2020-05-18
* **New Features**
* Add max records option for sampling with basic scans. Requires server version 4.9 or later. [#359](https://github.com/aerospike/aerospike-client-nodejs/pull/359)
* Add support for HyperLogLog data type and operations. Requires server version 4.9 or later. [#361](https://github.com/aerospike/aerospike-client-nodejs/pull/361)
* Add minConnsPerNode and maxSocketIdle client config. [#366](https://github.com/aerospike/aerospike-client-nodejs/pull/366)
* **Updates**
* *BREAKING*: The client no longer supports the percent-based scan sampling for server versions 4.9 or later. Use the new max records scan policy option instead.
* Update C client library to [v4.6.16](http://www.aerospike.com/download/client/c/notes.html#4.6.16).
* Update dependencies with potential vulnerabilities by running npm audit fix. [#367](https://github.com/aerospike/aerospike-client-nodejs/pull/367)
## [3.15.0] - 2020-03-24

@@ -9,0 +21,0 @@

@@ -55,3 +55,3 @@ #!/usr/bin/env node

const game = {
client: client,
client,
noDarts: argv.darts, // number of darts to throw

@@ -58,0 +58,0 @@ maxInFlight: argv.maxInFlight,

@@ -25,5 +25,5 @@ {

"ansi-styles": {
"version": "4.2.0",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.0.tgz",
"integrity": "sha512-7kFQgnEaMdRtwf6uSfUnVr9gSGC7faurn+J/Mv90/W+iTtN0405/nLdopfMWwchyxhbGYl6TC4Sccn9TUkGAgg==",
"version": "4.2.1",
"resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.2.1.tgz",
"integrity": "sha512-9VGjrMsG1vePxcSweQsN20KY/c4zN0h9fLjqAbwbPfahM3t+NL+M9HC8xeXG2I8pX5NoamTGNuomEUFI7fcUjA==",
"requires": {

@@ -145,5 +145,5 @@ "@types/color-name": "^1.1.1",

"p-limit": {
"version": "2.2.1",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.2.1.tgz",
"integrity": "sha512-85Tk+90UCVWvbDavCLKPOLC9vvY8OwEX/RtKF+/1OADJMVlFfEHOiMTPVyxg7mk/dKa+ipdHm0OUkTvCpMTuwg==",
"version": "2.3.0",
"resolved": "https://registry.npmjs.org/p-limit/-/p-limit-2.3.0.tgz",
"integrity": "sha512-//88mFWSJx8lxCzwdAABTJL2MyWB12+eIY7MDL2SqLmAkeKU9qxRvWuSyTjm3FUmpBEMuFfckAIqEaVGUDxb6w==",
"requires": {

@@ -225,5 +225,5 @@ "p-try": "^2.0.0"

"yargs": {
"version": "15.0.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.0.1.tgz",
"integrity": "sha512-47i2DJb+gkLpioPBdMmnvb4QkAuyz7tLes9nCgYDXEdPf05tqjCQpUELea3MfmoomS9NKAZlZEifstKIXiASMw==",
"version": "15.3.1",
"resolved": "https://registry.npmjs.org/yargs/-/yargs-15.3.1.tgz",
"integrity": "sha512-92O1HWEjw27sBfgmXiixJWT5hRBp2eobqXicLtPBIDBhYB+1HpwZlXmbW2luivBJHBzki+7VyCLRtAkScbTBQA==",
"requires": {

@@ -240,9 +240,9 @@ "cliui": "^6.0.0",

"y18n": "^4.0.0",
"yargs-parser": "^16.1.0"
"yargs-parser": "^18.1.1"
}
},
"yargs-parser": {
"version": "16.1.0",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-16.1.0.tgz",
"integrity": "sha512-H/V41UNZQPkUMIT5h5hiwg4QKIY1RPvoBV4XcjUbRM8Bk2oKqqyZ0DIEbTFZB0XjbtSPG8SAa/0DxCQmiRgzKg==",
"version": "18.1.2",
"resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-18.1.2.tgz",
"integrity": "sha512-hlIPNR3IzC1YuL1c2UwwDKpXlNFBqD1Fswwh1khz5+d8Cq/8yc/Mn0i+rQXduu8hcrFKvO7Eryk+09NecTQAAQ==",
"requires": {

@@ -249,0 +249,0 @@ "camelcase": "^5.0.0",

@@ -15,4 +15,4 @@ {

"aerospike": "file:..",
"yargs": "^15.0.1"
"yargs": "^15.3.1"
}
}

@@ -95,2 +95,12 @@ // *****************************************************************************

/**
* The {@link module:aerospike/hll|hll} module defines operations on the
* HyperLogLog data type.
*
* @summary {@link module:aerospike/hll|aerospike/hll} module
*
* @since v3.16.0
*/
exports.hll = require('./hll')
/**
* The {@link module:aerospike/maps|maps} module defines operations on the Maps

@@ -97,0 +107,0 @@ * complex data type.

// *****************************************************************************
// Copyright 2013-2019 Aerospike, Inc.
// Copyright 2013-2020 Aerospike, Inc.
//

@@ -331,2 +331,28 @@ // Licensed under the Apache License, Version 2.0 (the "License")

/**
* @name Config#maxSocketIdle
*
* @summary Maximum socket idle time in seconds.
*
* @description Connection pools will discard sockets that have been idle
* longer than the maximum. The value is limited to 24 hours (86400).
*
* It's important to set this value to a few seconds less than the server's
* <code>proto-fd-idle-ms</code> (default 60000 milliseconds or 1 minute),
* so the client does not attempt to use a socket that has already been
* reaped by the server.
*
* Connection pools are now implemented by a LIFO stack. Connections at the
* tail of the stack will always be the least used. These connections are
* checked for <code>maxSocketIdle</code> once every 30 tend iterations
* (usually 30 seconds).
*
* @type {number}
*
* @default 55 seconds
*/
if (Number.isInteger(config.maxSocketIdle)) {
this.maxSocketIdle = config.maxSocketIdle
}
/**
* @name Config#tenderInterval

@@ -343,7 +369,11 @@ * @summary Polling interval in milliseconds for cluster tender.

* @name Config#maxConnsPerNode
* @summary Maximum number of asynchronous connections allowed for each node.
*
* @summary Maximum number of asynchronous connections allowed per server node.
*
* @description New transactions will be rejected with an {@link
* module:aerospike/status.ERR_NO_MORE_CONNECTIONS|ERR_NO_MORE_CONNECTIONS}
* error if the limit would be exceeded.
*
* @type {number}
*
* @default 300

@@ -355,2 +385,28 @@ */

/**
* @name Config#minConnsPerNode
*
* @summary Minimum number of asynchronous connections allowed per server node.
*
* @description Preallocate min connections on client node creation. The
* client will periodically allocate new connections if count falls below
* min connections.
*
* Server <code>proto-fd-idle-ms</code> may also need to be increased
* substantially if min connections are defined. The
* <code>proto-fd-idle-ms</code> default directs the server to close
* connections that are idle for 60 seconds which can defeat the purpose of
* keeping connections in reserve for a future burst of activity.
*
* If server <code>proto-fd-idle-ms</code> is changed, client {@link
* Config#maxSocketIdle} should also be changed to be a few seconds less
* than <code>proto-fd-idle-ms</code>.
*
* @type {number}
* @default 0
*/
if (Number.isInteger(config.minConnsPerNode)) {
this.minConnsPerNode = config.minConnsPerNode
}
if (typeof config.modlua === 'object') {

@@ -357,0 +413,0 @@ /**

@@ -106,5 +106,5 @@ // *****************************************************************************

module.exports = {
releaseEventLoop: releaseEventLoop,
registerASEventLoop: registerASEventLoop,
setCommandQueuePolicy: setCommandQueuePolicy
releaseEventLoop,
registerASEventLoop,
setCommandQueuePolicy
}

@@ -79,4 +79,4 @@ // *****************************************************************************

super(as.predicates.RANGE, bin, dataType, indexType, {
min: min,
max: max
min,
max
})

@@ -83,0 +83,0 @@ }

@@ -252,4 +252,4 @@ // *****************************************************************************

return {
stats: stats,
names: names
stats,
names
}

@@ -259,4 +259,4 @@ }

module.exports = {
parse: parse,
separators: separators
parse,
separators
}
// *****************************************************************************
// Copyright 2013-2019 Aerospike, Inc.
// Copyright 2013-2020 Aerospike, Inc.
//

@@ -48,2 +48,8 @@ // Licensed under the Apache License, Version 2.0 (the "License")

*
* #### CDT Context - Operating on Nested Lists
*
* To operate on nested lists, use the {@link
* module:aerospike/lists~ListOperation#withContext ListOperation#withContext}
* function to set the context for a list operation.
*
* @see {@link Client#operate}

@@ -53,3 +59,3 @@ */

const as = require('bindings')('aerospike.node')
const opcodes = as.operations
const opcodes = as.listOperations
const Context = require('./cdt_context')

@@ -279,3 +285,3 @@ const AerospikeError = require('./error')

return new ListOperation(opcodes.LIST_SET_ORDER, bin, {
order: order
order
})

@@ -296,3 +302,3 @@ }

return new ListOperation(opcodes.LIST_SORT, bin, {
flags: flags
flags
})

@@ -337,4 +343,4 @@ }

return new ListOperation(opcodes.LIST_APPEND, bin, {
value: value,
policy: policy
value,
policy
})

@@ -379,4 +385,4 @@ }

return new ListOperation(opcodes.LIST_APPEND_ITEMS, bin, {
list: list,
policy: policy
list,
policy
})

@@ -422,5 +428,5 @@ }

return new ListOperation(opcodes.LIST_INSERT, bin, {
index: index,
value: value,
policy: policy
index,
value,
policy
})

@@ -465,5 +471,5 @@ }

return new ListOperation(opcodes.LIST_INSERT_ITEMS, bin, {
index: index,
list: list,
policy: policy
index,
list,
policy
})

@@ -674,4 +680,4 @@ }

return new ListOperation(opcodes.LIST_REMOVE_BY_INDEX, bin, {
index: index,
returnType: returnType
index,
returnType
})

@@ -703,5 +709,5 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_INDEX_RANGE, bin, {
index: index,
count: count,
returnType: returnType
index,
count,
returnType
})

@@ -731,4 +737,4 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE, bin, {
value: value,
returnType: returnType
value,
returnType
})

@@ -758,4 +764,4 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_LIST, bin, {
values: values,
returnType: returnType
values,
returnType
})

@@ -790,5 +796,5 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_RANGE, bin, {
begin: begin,
end: end,
returnType: returnType
begin,
end,
returnType
})

@@ -860,6 +866,6 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_VALUE_REL_RANK_RANGE, bin, {
value: value,
rank: rank,
count: count,
returnType: returnType
value,
rank,
count,
returnType
})

@@ -889,4 +895,4 @@ }

return new ListOperation(opcodes.LIST_REMOVE_BY_RANK, bin, {
rank: rank,
returnType: returnType
rank,
returnType
})

@@ -918,5 +924,5 @@ }

return new InvertibleListOp(opcodes.LIST_REMOVE_BY_RANK_RANGE, bin, {
rank: rank,
count: count,
returnType: returnType
rank,
count,
returnType
})

@@ -1157,4 +1163,4 @@ }

return new ListOperation(opcodes.LIST_GET_BY_INDEX, bin, {
index: index,
returnType: returnType
index,
returnType
})

@@ -1186,5 +1192,5 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_INDEX_RANGE, bin, {
index: index,
count: count,
returnType: returnType
index,
count,
returnType
})

@@ -1214,4 +1220,4 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE, bin, {
value: value,
returnType: returnType
value,
returnType
})

@@ -1241,4 +1247,4 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_LIST, bin, {
values: values,
returnType: returnType
values,
returnType
})

@@ -1273,5 +1279,5 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_RANGE, bin, {
begin: begin,
end: end,
returnType: returnType
begin,
end,
returnType
})

@@ -1342,6 +1348,6 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_VALUE_REL_RANK_RANGE, bin, {
value: value,
rank: rank,
count: count,
returnType: returnType
value,
rank,
count,
returnType
})

@@ -1371,4 +1377,4 @@ }

return new ListOperation(opcodes.LIST_GET_BY_RANK, bin, {
rank: rank,
returnType: returnType
rank,
returnType
})

@@ -1400,5 +1406,5 @@ }

return new InvertibleListOp(opcodes.LIST_GET_BY_RANK_RANGE, bin, {
rank: rank,
count: count,
returnType: returnType
rank,
count,
returnType
})

@@ -1447,5 +1453,5 @@ }

return new ListOperation(opcodes.LIST_INCREMENT, bin, {
index: index,
value: value,
policy: policy
index,
value,
policy
})

@@ -1452,0 +1458,0 @@ }

// *****************************************************************************
// Copyright 2013-2019 Aerospike, Inc.
// Copyright 2013-2020 Aerospike, Inc.
//

@@ -20,3 +20,3 @@ // Licensed under the Apache License, Version 2.0 (the "License")

const as = require('bindings')('aerospike.node')
const opcodes = as.operations
const opcodes = as.mapOperations
const policy = require('./policy')

@@ -72,5 +72,11 @@ const Context = require('./cdt_context')

*
* #### CDT Context - Operating on Nested Maps
*
* To operate on nested maps, use the {@link
* module:aerospike/maps~MapOperation#withContext MapOperation#withContext}
* function to set the context for a map operation.
*
* @see {@link Client#operate}
*
* @example
* @example <caption>Manipulating a map bin using map operations</caption>
*

@@ -103,3 +109,3 @@ * const Aerospike = require('aerospike')

* })
*/
*/

@@ -574,6 +580,6 @@ /**

return new MapOperation(opcodes.MAP_REMOVE_BY_KEY_REL_INDEX_RANGE, bin, {
key: key,
index: index,
count: count,
returnType: returnType
key,
index,
count,
returnType
})

@@ -713,6 +719,6 @@ }

return new MapOperation(opcodes.MAP_REMOVE_BY_VALUE_REL_RANK_RANGE, bin, {
value: value,
rank: rank,
count: count,
returnType: returnType
value,
rank,
count,
returnType
})

@@ -943,6 +949,6 @@ }

return new MapOperation(opcodes.MAP_GET_BY_KEY_REL_INDEX_RANGE, bin, {
key: key,
index: index,
count: count,
returnType: returnType
key,
index,
count,
returnType
})

@@ -1056,6 +1062,6 @@ }

return new MapOperation(opcodes.MAP_GET_BY_VALUE_REL_RANK_RANGE, bin, {
value: value,
rank: rank,
count: count,
returnType: returnType
value,
rank,
count,
returnType
})

@@ -1062,0 +1068,0 @@ }

@@ -53,3 +53,3 @@ // *****************************************************************************

const as = require('bindings')('aerospike.node')
const ops = as.operations
const ops = as.scalarOperations

@@ -56,0 +56,0 @@ /**

@@ -76,2 +76,17 @@ // *****************************************************************************

this.recordsPerSecond = props.recordsPerSecond
/**
* Approximate number of records to return to client. This number is
* divided by the number of nodes involved in the scan. The actual number
* of records returned may be less than maxRecords if node record counts
* are small and unbalanced across nodes.
*
* Requires Aerospike Server version >= 4.9.
*
* @type number
* @default 0 (do not limit record count)
*
* @since v3.16.0
*/
this.maxRecords = props.maxRecords
}

@@ -78,0 +93,0 @@ }

@@ -143,4 +143,8 @@ // *****************************************************************************

/**
* Percentage of records in the cluster to scan.
* Percentage of records in the cluster to scan. Valid integer range is 1 to
* 100.
*
* This field is supported on server versions < 4.9. For server versions >=
* 4.9, use {@link ScanPolicy#maxRecords}.
*
* @member {number} Scan#percent

@@ -147,0 +151,0 @@ */

@@ -55,4 +55,4 @@ // *****************************************************************************

module.exports = {
parseHostString: parseHostString,
print: print
parseHostString,
print
}
{
"name": "aerospike",
"version": "3.15.0",
"version": "3.16.0",
"description": "Aerospike Client Library",

@@ -55,4 +55,4 @@ "keywords": [

"ink-docstrap": "^1.3.0",
"jsdoc": "^3.6.3",
"mocha": "^7.0.0",
"jsdoc": "^3.6.4",
"mocha": "^7.1.2",
"mocha-clean": "^1.0.0",

@@ -63,3 +63,3 @@ "nyc": "^15.0.0",

"tmp": "^0.1",
"yargs": "^15.1.0"
"yargs": "^15.3.1"
},

@@ -66,0 +66,0 @@ "standard": {

@@ -149,3 +149,3 @@ # Aerospike Node.js Client [![travis][travis-image]][travis-url] [![codecov][codecov-image]][codecov-url] [![npm][npm-image]][npm-url] [![downloads][downloads-image]][downloads-url]

```bash
sudo apt-get install g++ libssl1.0.0 libssl-dev libz-dev
sudo apt-get install g++ libssl1.0.0 libssl-dev zlib1g-dev
```

@@ -152,0 +152,0 @@

@@ -32,3 +32,3 @@ // *****************************************************************************

const cmds = Array.from({ length: 10 }, (_, i) =>
client.put(new Aerospike.Key('test', 'test', i), { i: i }))
client.put(new Aerospike.Key('test', 'test', i), { i }))
Promise.all(cmds)

@@ -50,3 +50,3 @@ .then(results => done(results.length))

const cmds = Array.from({ length: 10 }, (_, i) =>
client.put(new Aerospike.Key('test', 'test', i), { i: i }))
client.put(new Aerospike.Key('test', 'test', i), { i }))
Promise.all(cmds)

@@ -53,0 +53,0 @@ .then(() => done('All commands processed successfully'))

@@ -42,5 +42,14 @@ // *****************************************************************************

const settings = {
authMode: Aerospike.auth.EXTERNAL_INSECURE,
clusterName: 'testCluster',
connTimeoutMs: 1000,
hosts: [{ addr: 'localhost', port: 3000 }],
log: { level: 1, file: 2 },
loginTimeoutMs: 2000,
maxConnsPerNode: 200,
maxSocketIdle: 30,
minConnsPerNode: 10,
modlua: { userPath: '/user/path' },
password: 'sekret',
port: 3333,
policies: {

@@ -57,33 +66,30 @@ apply: new Aerospike.ApplyPolicy({ totalTimeout: 1000 }),

},
connTimeoutMs: 1000,
loginTimeoutMs: 2000,
rackAware: true,
rackId: 42,
sharedMemory: { key: 1234 },
tenderInterval: 1000,
user: 'admin',
password: 'sekret',
authMode: Aerospike.auth.EXTERNAL_INSECURE,
sharedMemory: { key: 1234 },
modlua: { userPath: '/user/path' },
tls: { enable: true, encryptOnly: true },
port: 3333,
rackAware: true,
rackId: 42
user: 'admin'
}
const config = new Config(settings)
expect(config).to.have.property('authMode')
expect(config).to.have.property('clusterName')
expect(config).to.have.property('connTimeoutMs')
expect(config).to.have.property('hosts')
expect(config).to.have.property('log')
expect(config).to.have.property('connTimeoutMs')
expect(config).to.have.property('loginTimeoutMs')
expect(config).to.have.property('tenderInterval')
expect(config).to.have.property('user')
expect(config).to.have.property('maxConnsPerNode')
expect(config).to.have.property('maxSocketIdle')
expect(config).to.have.property('minConnsPerNode')
expect(config).to.have.property('modlua')
expect(config).to.have.property('password')
expect(config).to.have.property('authMode')
expect(config).to.have.property('sharedMemory')
expect(config).to.have.property('modlua')
expect(config).to.have.property('tls')
expect(config).to.have.property('policies')
expect(config).to.have.property('port')
expect(config).to.have.property('policies')
expect(config).to.have.property('rackAware')
expect(config).to.have.property('rackId')
expect(config).to.have.property('sharedMemory')
expect(config).to.have.property('tenderInterval')
expect(config).to.have.property('tls')
expect(config).to.have.property('user')

@@ -90,0 +96,0 @@ const policies = config.policies

@@ -63,6 +63,6 @@ // *****************************************************************************

module.exports = {
bytes: bytes,
integer: integer,
string: string,
range: range
bytes,
integer,
string,
range
}

@@ -29,3 +29,3 @@ // *****************************************************************************

module.exports = {
constant: constant
constant
}

@@ -88,3 +88,3 @@ // *****************************************************************************

module.exports = {
put: put
put
}

@@ -42,4 +42,4 @@ // *****************************************************************************

module.exports = {
constant: constant,
record: record
constant,
record
}

@@ -31,3 +31,3 @@ // *****************************************************************************

module.exports = {
range: range
range
}

@@ -171,9 +171,9 @@ // *****************************************************************************

module.exports = {
bytes: bytes,
constant: constant,
integer: integer,
string: string,
double: double,
array: array,
map: map
bytes,
constant,
integer,
string,
double,
array,
map
}

@@ -620,3 +620,3 @@ // *****************************************************************************

const key = batchKeyGen()
await client.put(key, { i: i })
await client.put(key, { i })
keys.push(key)

@@ -650,3 +650,3 @@ }

const key = batchKeyGen()
await client.put(key, { i: i })
await client.put(key, { i })
batch.push({ key })

@@ -653,0 +653,0 @@ }

@@ -150,3 +150,4 @@ // *****************************************************************************

failOnClusterChange: true,
recordsPerSecond: 50
recordsPerSecond: 50,
maxRecords: 5000
})

@@ -194,2 +195,4 @@

context('with percent sampling', function () {
helper.skipUnlessVersion('< 4.9', this)
it('should only scan approx. half of the records', function (done) {

@@ -212,2 +215,21 @@ const scan = client.scan(helper.namespace, testSet, {

context('with max records limit', function () {
helper.skipUnlessVersion('>= 4.9.0', this)
it('returns at most X number of records', function (done) {
const scan = client.scan(helper.namespace, testSet, { nobins: true })
const maxRecords = 33
const stream = scan.foreach({ maxRecords })
let recordsReceived = 0
stream.on('data', () => recordsReceived++)
stream.on('end', () => {
// The actual number returned may be less than maxRecords if node
// record counts are small and unbalanced across nodes.
expect(recordsReceived).to.be.at.most(maxRecords)
done()
})
})
})
context('without set', function () {

@@ -214,0 +236,0 @@ it('executes a scan without set', function (done) {

@@ -72,4 +72,4 @@ // *****************************************************************************

module.exports = {
interval: interval,
generate: generate
interval,
generate
}

@@ -45,3 +45,3 @@ // *****************************************************************************

const temp = createTempFile(fn, data)
return childProcess.fork(temp, { env: env })
return childProcess.fork(temp, { env })
}

@@ -48,0 +48,0 @@

@@ -59,4 +59,5 @@ // *****************************************************************************

exports.operate = (ops) => (state) =>
state.set('result', helper.client.operate(state.key, Array.isArray(ops) ? ops : [ops]))
exports.operate = (ops) => (state) => {
return state.set('result', helper.client.operate(state.key, Array.isArray(ops) ? ops : [ops]))
}

@@ -63,0 +64,0 @@ exports.assertResultEql = (expected) => (state) => {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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