Socket
Socket
Sign inDemoInstall

aerospike

Package Overview
Dependencies
Maintainers
4
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 4.0.1 to 4.0.2

lib/binding/node-v102-darwin-x64/aerospike.node

10

CHANGELOG.md

@@ -14,3 +14,3 @@ # Changelog

* **New Features**
* [CLIENT-1678] - Support boolean particle type. This feature requires Aerospike server version 5.6+. [#428](https://github.com/aerospike/aerospike-client-nodejs/pull/428)
* [CLIENT-1678] - Support boolean particle type. This feature requires server 5.6+. [#428](https://github.com/aerospike/aerospike-client-nodejs/pull/428)
* [CLIENT-1679] - Add support for Aerospike Expressions.

@@ -86,3 +86,3 @@ * [CLIENT-1680] - Added TypeScript typings. [#446](https://github.com/aerospike/aerospike-client-nodejs/pull/446) Thanks to [@bit0r1n](https://github.com/bit0r1n)!

* **Bug Fixes**
* Fix memory leaks when running secondary index queries with string filter predicates. [#370](https://github.com/aerospike/aerospike-client-nodejs/issues/370)
* Fix memory leaks when running secondary index (SI) queries with string filter predicates. [#370](https://github.com/aerospike/aerospike-client-nodejs/issues/370)

@@ -342,3 +342,3 @@ ## [3.16.0] - 2020-05-18

* Support nobins flag on query operations
* Support CDT List Increment operation. Requires Aerospike server version 3.15 or later.
* Support CDT List Increment operation. Requires server 3.15 or later.
* Improved timeout handling and automatic transaction retries - see [detailed API changes](https://www.aerospike.com/docs/client/nodejs/usage/incompatible.html#version-3-0-0) for more info.

@@ -525,3 +525,3 @@ * Support gen policy for apply UDF operation.

* **New Features**
* Support for operations on Sorted Maps. Requires Aerospike server version 3.8.4 or later.
* Support for operations on Sorted Maps. Requires server 3.8.4 or later.

@@ -621,3 +621,3 @@ * **Improvements**

* Added support for creating secondary indexes on list and map values;
requires Aerospike server version >= 3.8. [CLIENT-684]
requires server >= 3.8. [CLIENT-684]
* Added `Aerospike.info` module with `parseInfo` utility method to parse info

@@ -624,0 +624,0 @@ string returned by Aerospike cluster nodes using `Client#info` method.

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

exports.command = 'sindex <command>'
exports.describe = 'Manage secondary indexes'
exports.describe = 'Manage secondary indexes (SI)'
exports.builder = yargs => {

@@ -64,3 +64,3 @@ return yargs

command: 'create <bin> <index> <type>',
desc: 'Create a secondary index',
desc: 'Create a SI',
handler: shared.run(sindexCreate),

@@ -76,5 +76,5 @@ builder: {

command: 'remove <index>',
desc: 'Remove a secondary index',
desc: 'Remove a SI',
handler: shared.run(sindexRemove)
})
}

@@ -38,3 +38,3 @@ // *****************************************************************************

* The {@link module:aerospike/filter|filter} module provides functions to
* create secondary index filter predicates for use in query operations via the
* create secondary index (SI) filter predicates for use in query operations via the
* {@link Client#query} command.

@@ -375,3 +375,3 @@ *

* @property {number} DONT_UPDATE - Update the record without changing the
* record's TTL value. Requires Aerospike Server version 3.10.1 or later.
* record's TTL value. Requires server 3.10.1 or later.
*

@@ -427,3 +427,3 @@ * @example <caption>Use ttl.DONT_UPDATE to change the value of a record

/**
* @summary Enumeration of secondary index data types.
* @summary Enumeration of SI data types.
*

@@ -433,5 +433,5 @@ * @readonly

*
* @property {number} STRING - Values contained in the secondary index are strings.
* @property {number} NUMERIC - Values contained in the secondary index are integers.
* @property {number} GEO2DSPHERE - Values contained in the secondary index are GeoJSON values (points or polygons).
* @property {number} STRING - Values contained in the SI are strings.
* @property {number} NUMERIC - Values contained in the SI are integers.
* @property {number} GEO2DSPHERE - Values contained in the SI are GeoJSON values (points or polygons).
*

@@ -443,3 +443,3 @@ * @see {@link Client#createIndex}

/**
* @summary Enumeration of secondary index types.
* @summary Enumeration of SI types.
*

@@ -449,11 +449,11 @@ * @readonly

*
* @property {number} DEFAULT - Default secondary index type for bins
* @property {number} DEFAULT - Default SI type for bins
* containing scalar values (i.e. integer, string).
* @property {number} LIST - Secondary index for bins containing
* @property {number} LIST - SI for bins containing
* <a href="http://www.aerospike.com/docs/guide/cdt-list.html" title="Aerospike List Data Type">&uArr;Lists</a>;
* the index will be build over the individual entries of the list.
* @property {number} MAPKEYS - Secondary index for bins containing
* @property {number} MAPKEYS - SI for bins containing
* <a href="http://www.aerospike.com/docs/guide/cdt-map.html" title="Aerospike Maps Data Type">&uArr;Maps</a>;
* the index will be build over the individual keys of the map entries.
* @property {number} MAPVALUES - Secondary index for bins containing
* @property {number} MAPVALUES - SI for bins containing
* <a href="http://www.aerospike.com/docs/guide/cdt-map.html" title="Aerospike Maps Data Type">&uArr;Maps</a>;

@@ -460,0 +460,0 @@ * the index will be build over the individual values of the map entries.

@@ -347,3 +347,3 @@ // *****************************************************************************

* This method allows different namespaces/bins to be requested for each key in
* the batch. This method requires Aerospike Server version >= 3.6.0.
* the batch. This method requires server >= 3.6.0.
*

@@ -550,3 +550,3 @@ * @param {object[]} records - List of keys and bins to retrieve.

*
* @summary Creates a secondary index.
* @summary Creates a secondary index (SI).
*

@@ -639,3 +639,3 @@ * @description

* if (error) throw error
* console.info('secondary index %s on %s was created successfully', indexName, binName)
* console.info('SI %s on %s was created successfully', indexName, binName)
* client.close()

@@ -670,3 +670,3 @@ * })

*
* @summary Creates a secondary index of type Integer.
* @summary Creates a SI of type Integer.
*

@@ -708,3 +708,3 @@ * @description This is a short-hand for calling {@link Client#createIndex}

* if (error) throw error
* console.info('secondary index %s on %s was created successfully', indexName, binName)
* console.info('SI %s on %s was created successfully', indexName, binName)
* client.close()

@@ -722,3 +722,3 @@ * })

*
* @summary Creates a secondary index of type String.
* @summary Creates a SI of type String.
*

@@ -760,3 +760,3 @@ * @description This is a short-hand for calling {@link Client#createIndex}

* if (error) throw error
* console.info('secondary index %s on %s was created successfully', indexName, binName)
* console.info('SI %s on %s was created successfully', indexName, binName)
* client.close()

@@ -811,3 +811,3 @@ * })

* if (error) throw error
* console.info('secondary index %s on %s was created successfully', indexName, binName)
* console.info('SI %s on %s was created successfully', indexName, binName)
* client.close()

@@ -1514,3 +1514,3 @@ * })

* @description This method is many orders of magnitude faster than deleting
* records one at a time. It requires Aerospike Server version 3.12 or later.
* records one at a time. It requires server 3.12 or later.
*

@@ -1517,0 +1517,0 @@ * @param {string} ns - Required namespace.

@@ -25,3 +25,3 @@ // *****************************************************************************

*
* @description This module provides functions to create secondary index filter
* @description This module provides functions to create secondary index (SI) filter
* predicates for use in query operations via the {@link Client#query} command.

@@ -51,3 +51,3 @@ *

* @class module:aerospike/filter~SindexFilterPredicate
* @classdesc Secondary index filter predicate to limit the scope of a {@link Query}.
* @classdesc SI filter predicate to limit the scope of a {@link Query}.
*

@@ -129,3 +129,3 @@ * Filter predicates must be instantiated using the methods in the {@link

* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -145,3 +145,3 @@ */

* @param {string} value - The filter value.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -164,3 +164,3 @@ */

* i.e. LIST, MAPVALUES or MAPKEYS.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -186,3 +186,3 @@ *

* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -205,3 +205,3 @@ *

* @description Depending on the index type, the filter will match GeoJSON
* regions within list or map values as well (requires Aerospike server version
* regions within list or map values as well (requires server
* >= 3.8).

@@ -213,3 +213,3 @@ *

* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -241,3 +241,3 @@ *

* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -256,3 +256,3 @@ *

* @description Depending on the index type, the filter will match GeoJSON
* regions within list or map values as well (requires Aerospike server version
* regions within list or map values as well (requires server
* >= 3.8).

@@ -265,3 +265,3 @@ *

* module:aerospike.indexType}, i.e. LIST or MAPVALUES.
* @returns {module:aerospike/filter~SindexFilterPredicate} Secondary index
* @returns {module:aerospike/filter~SindexFilterPredicate} SI
* filter predicate, that can be applied to queries using {@link Query#where}.

@@ -268,0 +268,0 @@ *

@@ -51,3 +51,3 @@ // *****************************************************************************

* .then(() => {
* console.info('Secondary index %s on %s was created successfully', indexName, binName)
* console.info('secondary index (SI) %s on %s was created successfully', indexName, binName)
* client.close()

@@ -81,3 +81,3 @@ * })

/**
* Fetches info for the secondary index from each cluster node.
* Fetches info for the SI from each cluster node.
*

@@ -104,3 +104,3 @@ * @private

*
* @summary Wait until the job of creating a secondary index has completed.
* @summary Wait until the job of creating a SI has completed.
*

@@ -107,0 +107,0 @@ * @param {number} [pollInterval=1000] - Interval in milliseconds to use when polling the cluster nodes.

@@ -54,2 +54,27 @@ // *****************************************************************************

this.deserialize = props.deserialize
/**
* Terminate the query if the cluster is in migration state. If the query's
* "where" clause is not defined (scan), this field is ignored.
*
* Requires Aerospike Server version 4.2.0.2 or later.
*
* @type boolean
* @default <code>false</code>
* @since v3.4.0
*/
this.failOnClusterChange = props.failOnClusterChange
/**
* Timeout in milliseconds used when the client sends info commands to
* check for cluster changes before and after the query. This timeout is
* only used when {@link
* QueryPolicy#failOnClusterChange|failOnClusterChange} is true and the
* query's "where" clause is defined.
*
* @type number
* @default 10000 ms
* @since v3.16.5
*/
this.infoTimeout = props.infoTimeout
}

@@ -56,0 +81,0 @@ }

@@ -60,3 +60,3 @@ // *****************************************************************************

*
* Requires Aerospike Server version >= 4.7.
* Requires server >= 4.7.
*

@@ -76,3 +76,3 @@ * @type number

*
* Requires Aerospike Server version >= 4.9.
* Requires server >= 4.9.
*

@@ -79,0 +79,0 @@ * @type number

@@ -27,10 +27,10 @@ // *****************************************************************************

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*
* @description This module defines predicate expression that provide a mechanism
* for additional filtering on the resultset of a secondary index query or
* primary index query (scan) operation.
* @description This module defines predicate expression which is a mechanism
* for additional filtering on the resultset of a secondary index (SI) query or
* primary index (PI) query (scan) operation.
*
* PredicateExpression filtering was deprecated in Aerospike Server version 5.2 and
* removed in Aerospike Server version 6.0.
* PredicateExpression filtering was deprecated in server 5.2 and
* removed in server 6.0.
* Use Filter Expressions, implemented by the aerospike/exp module.

@@ -48,5 +48,5 @@ *

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*
* Sequences of predicate expressions are used limit the results of query
* Sequences of predicate expressions limit the results of query
* operations. They are created using the methods in the {@link

@@ -66,3 +66,3 @@ * module:aerospike/predexp|predexp module}.

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -104,3 +104,3 @@ * @description The AND predicate expression returns true if all of its

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -142,3 +142,3 @@ * @description The OR predicate expression returns true if any of its children

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -175,3 +175,3 @@ * @description The NOT predicate expression returns true if its child is

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -209,3 +209,3 @@ * @description The integer value predicate expression pushes a single constant

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -243,3 +243,3 @@ * @description The string value predicate expression pushes a single constant

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -280,3 +280,3 @@ * @description The GeoJSON value predicate expression pushes a single constant

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -314,3 +314,3 @@ * @description The integer bin predicate expression pushes a single integer

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -348,3 +348,3 @@ * @description The string bin predicate expression pushes a single string bin

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -384,3 +384,3 @@ * @description The GeoJSON bin predicate expression pushes a single GeoJSON

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -418,3 +418,3 @@ * @description The list bin predicate expression pushes a single list bin

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -452,3 +452,3 @@ * @description The map bin predicate expression pushes a single map bin value

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -485,3 +485,3 @@ * @description The integer iteration variable is used in the subexpression

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -518,3 +518,3 @@ * @description The string iteration variable is used in the subexpression

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -537,3 +537,3 @@ * @description The GeoJSON iteration variable is used in the subexpression

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -566,3 +566,3 @@ * @description The record device size expression assumes the value of the size

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -596,3 +596,3 @@ * @description The record last update expression assumes the value of the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -625,3 +625,3 @@ * @description The record void time expression assumes the value of the number

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -655,3 +655,3 @@ * @description The digest modulo expression assumes the value of 4 bytes of

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -750,3 +750,3 @@ * @description The integer comparison expressions pop a pair of value

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -797,3 +797,3 @@ * @description The string comparison expressions pop a pair of value

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -843,3 +843,3 @@ * @description The string regex expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -884,3 +884,3 @@ * @description The Points-in-Region (within) expression pops two children off

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -922,3 +922,3 @@ * @description The Regions-Containing-Point (contains) expression pops two

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -961,3 +961,3 @@ * @description The list iteration expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -1001,3 +1001,3 @@ * @description The list iteration expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -1040,3 +1040,3 @@ * @description The map key iteration expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -1080,3 +1080,3 @@ * @description The map key iteration expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -1119,3 +1119,3 @@ * @description The map value iteration expression pops two children off the

*
* @deprecated since Aerospike Server version 5.2
* @deprecated since server 5.2
*

@@ -1122,0 +1122,0 @@ * @description The map value iteration expression pops two children off the

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

* @classdesc Aerospike Query operations perform value-based searches using
* secondary indexes. A Query object, created by calling {@link Client#query},
* secondary indexes (SI). A Query object, created by calling {@link Client#query},
* is used to execute queries on the specified namespace and set (optional).

@@ -46,5 +46,5 @@ * Queries can return a set of records as a {@link RecordStream} or be

*
* #### Secondary Index Filters
* #### SI Filters
*
* With a secondary index, the following queries can be made:
* With a SI, the following queries can be made:
*

@@ -62,7 +62,7 @@ * - [Equal query]{@link module:aerospike/filter.equal} against string or

*
* Before a filter predicate can be applied, a secondary index needs to be
* Before a filter predicate can be applied, a SI needs to be
* created on the bins which the predicate matches on. Using the Node.js
* client, a secondary index can be created using {@link Client#createIndex}.
* client, a SI can be created using {@link Client#createIndex}.
*
* Currently, only a single secondary index filter predicate is supported for
* Currently, only a single SI filter predicate is supported for
* each query. To do more advanced filtering, a predicate expression can be

@@ -74,4 +74,4 @@ * applied to the query (see below). Alternatively, User-Defined Functions

*
* Using Aerospike Predicate Filtering (deprecated in Aerospike server version 5.2;
* removed in Aerospike server version 6.0), you can:
* Using Aerospike Predicate Filtering (deprecated in server 5.2;
* removed in server 6.0), you can:
*

@@ -83,3 +83,3 @@ * - Filter out records based on record meta data, such as last-update-time or

*
* Predicate filter expressions can be combined with a secondary index filter.
* Predicate filter expressions can be combined with a SI filter.
*

@@ -229,3 +229,3 @@ * See {@link module:aerospike/predexp} for a list of deprecated predicate

* @see Use {@link Query#where} to add filter predicates to the query.
* @see Use {@link module:aerospike/filter} to create a secondary index
* @see Use {@link module:aerospike/filter} to create a SI
* filter.

@@ -296,8 +296,8 @@ */

*
* @summary Applies a secondary index filter and/or a predicate expression to
* @summary Applies a SI filter and/or a predicate expression to
* the query.
*
* @description Use a secondary index filter, a predicate expression, or both,
* @description Use a SI filter, a predicate expression, or both,
* to limit the results returned by the query. This method takes either a
* secondary index filter created using the {@link
* SI filter created using the {@link
* module:aerospike/filter|filter module}, or a sequence of predicate

@@ -312,3 +312,3 @@ * expressions created using the {@link module:aerospike/predexp|predexp

*
* @example <caption>Applying a secondary index filter to find all records
* @example <caption>Applying a SI filter to find all records
* where the 'tags' list bin contains the value 'blue':</caption>

@@ -330,3 +330,3 @@ *

*
* @see {@link module:aerospike/filter} to create secondary index filters.
* @see {@link module:aerospike/filter} to create SI filters.
* @see {@link module:aerospike/predexp} to create predicate expression filters.

@@ -555,3 +555,3 @@ *

*
* This method requires Aerospike Server version >= 3.7.0.
* This method requires server >= 3.7.0.
*

@@ -558,0 +558,0 @@ * @param {module:aerospike/operations~Operation[]} operations - List of write

@@ -213,3 +213,3 @@ // *****************************************************************************

*
* This method requires Aerospike Server version >= 3.7.0.
* This method requires server >= 3.7.0.
*

@@ -216,0 +216,0 @@ * @param {module:aerospike/operations~Operation[]} operations - List of write

@@ -436,3 +436,3 @@ // *****************************************************************************

/**
* Generic secondary index error.
* Generic secondary index (SI) error.
* @const {number}

@@ -467,3 +467,3 @@ */

/**
* Secondary index query timed out on server.
* SI query timed out on server.
* @const {number}

@@ -691,3 +691,3 @@ */

case exports.ERR_INDEX:
return 'Generic secondary index error.'
return 'Generic SI error.'

@@ -707,3 +707,3 @@ case exports.ERR_INDEX_NAME_MAXLEN:

case exports.ERR_QUERY_TIMEOUT:
return 'Secondary index query timed out on server.'
return 'SI query timed out on server.'

@@ -710,0 +710,0 @@ case exports.ERR_QUERY:

{
"name": "aerospike",
"version": "4.0.1",
"version": "4.0.2",
"description": "Aerospike Client Library",

@@ -5,0 +5,0 @@ "keywords": [

@@ -83,2 +83,49 @@ // *****************************************************************************

})
it('does not deadlock on extra query with failOnClusterChange info commands #389', async function () {
const test = async function (Aerospike, config) {
Object.assign(config, {
log: { level: Aerospike.log.OFF },
policies: {
query: new Aerospike.QueryPolicy({ totalTimeout: 10000, failOnClusterChange: true })
}
})
Aerospike.setupGlobalCommandQueue({ maxCommandsInProcess: 5, maxCommandsInQueue: 50 })
const setName = 'testGlobalCommandQueueDeadlock389'
const client = await Aerospike.connect(config)
try {
const job = await client.createIntegerIndex({
ns: 'test',
set: setName,
bin: 'i',
index: `idx-${setName}`
})
await job.wait(10)
} catch (error) {
// index already exists
if (error.code !== Aerospike.status.ERR_INDEX_FOUND) throw error
}
const puts = Array.from({ length: 5 }, (_, i) =>
client.put(new Aerospike.Key('test', setName, i), { i })
)
await Promise.all(puts)
try {
let results = Array.from({ length: 5 }, (_, i) => {
const query = client.query('test', setName)
query.where(Aerospike.filter.equal('i', i))
return query.results()
})
results = await Promise.all(results)
return results.reduce((sum, records) => sum + records.length, 0)
} catch (error) {
// throws "Delay queue timeout" error on deadlock
return error.message
}
}
const result = await helper.runInNewProcess(test, helper.config)
expect(result).to.eq(5)
})
})

@@ -242,3 +242,5 @@ // *****************************************************************************

totalTimeout: 2000,
maxRetries: 1
maxRetries: 1,
failOnClusterChange: true,
infoTimeout: 5000
})

@@ -249,2 +251,4 @@

expect(subject.maxRetries).to.equal(1)
expect(subject.failOnClusterChange).to.equal(true)
expect(subject.infoTimeout).to.equal(5000)
})

@@ -251,0 +255,0 @@ })

@@ -104,2 +104,3 @@ // *****************************************************************************

it('retrieves all records in the set', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet)

@@ -116,2 +117,3 @@ let recordsReceived = 0

it('returns the key if it is stored on the server', function (done) {
this.timeout(10000) // 10 second timeout
// requires { key: Aerospike.policy.key.SEND } when creating the record

@@ -129,2 +131,3 @@ const scan = client.scan(helper.namespace, testSet)

it('attaches event handlers to the stream', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet)

@@ -145,2 +148,3 @@ let dataHandlerCalled = false

it('sets a scan policy', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet)

@@ -158,3 +162,3 @@ const policy = new Aerospike.ScanPolicy({

stream.on('error', error => {
if (error.code === Aerospike.status.ERR_CLUSTER_CHANGE) {
if (error.code === Aerospike.status.ERR_TIMEOUT) {
// ignore errors caused by cluster change events

@@ -170,2 +174,3 @@ } else {

it('should return only meta data', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet, { nobins: true })

@@ -185,2 +190,3 @@ const stream = scan.foreach()

it('should return only selected bins', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet)

@@ -201,2 +207,3 @@ scan.select('i')

it('returns at most X number of records', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace, testSet, { nobins: true })

@@ -219,2 +226,3 @@

it('executes a scan without set', function (done) {
this.timeout(10000) // 10 second timeout
const scan = client.scan(helper.namespace)

@@ -221,0 +229,0 @@ let recordsReceived = 0

@@ -78,4 +78,4 @@ // *****************************************************************************

}
console.info('generating secondary index on performance data')
console.time('creating secondary index')
console.info('generating secondary index (SI) on performance data')
console.time('creating SI')
client.createIndex(index, function (err, job) {

@@ -85,3 +85,3 @@ if (err) throw err

job.waitUntilDone(function () {
console.timeEnd('creating secondary index')
console.timeEnd('creating SI')
client.put(idxKey, { norec: numberOfRecords, set: testSet }, done)

@@ -88,0 +88,0 @@ })

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

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is too big to display

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