aerospike
Advanced tools
Comparing version 3.9.0 to 3.10.0
@@ -7,2 +7,14 @@ # Changelog | ||
## [3.10.0] - 2019-04-08 | ||
* **New Features** | ||
* Support new relaxed read modes for SC namespaces. (via C client v4.6) | ||
* Use stack based connection pools for more aggressive trimming of idle connections. (via C client v4.6) | ||
* **Updates** | ||
* *BREAKING*: Read consistency level changes - see [Incompatible API Changes](https://www.aerospike.com/docs/client/nodejs/usage/incompatible.html#version-3-10-0) for details. | ||
* Update C client library to [v4.6.1](http://www.aerospike.com/download/client/c/notes.html#4.6.1). | ||
* Update nan to [v2.12.1](https://github.com/nodejs/nan/blob/master/CHANGELOG.md). | ||
* Update mocha, codecov & other dev dependencies to latest version. | ||
## [3.9.0] - 2019-02-20 | ||
@@ -9,0 +21,0 @@ |
// ***************************************************************************** | ||
// Copyright 2013-2017 Aerospike, Inc. | ||
// Copyright 2013-2019 Aerospike, Inc. | ||
// | ||
@@ -79,11 +79,2 @@ // Licensed under the Apache License, Version 2.0 (the "License") | ||
this.durableDelete = props.durableDelete | ||
/** | ||
* Force reads to be linearized for server namespaces that support strong | ||
* consistency (aka CP mode). | ||
* | ||
* @type boolean | ||
* @default <code>false</code> | ||
*/ | ||
this.linearizeRead = props.linearizeRead | ||
} | ||
@@ -90,0 +81,0 @@ } |
// ***************************************************************************** | ||
// Copyright 2013-2017 Aerospike, Inc. | ||
// Copyright 2013-2019 Aerospike, Inc. | ||
// | ||
@@ -38,12 +38,2 @@ // Licensed under the Apache License, Version 2.0 (the "License") | ||
/** | ||
* Specifies the number of replicas consulted when reading for the desired | ||
* consistency guarantee. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.consistencyLevel.ONE | ||
* @see {@link module:aerospike/policy.consistencyLevel} for supported policy values. | ||
*/ | ||
this.consistencyLevel = props.consistencyLevel | ||
/** | ||
* Should CDT data types (Lists / Maps) be deserialized to JS data types | ||
@@ -79,9 +69,18 @@ * (Arrays / Objects) or returned as raw bytes (Buffer). | ||
/** | ||
* Force reads to be linearized for server namespaces that support strong | ||
* consistency (aka CP mode). | ||
* Read policy for AP (availability) namespaces. | ||
* | ||
* @type boolean | ||
* @default <code>false</code> | ||
* @type number | ||
* @default Aerospike.policy.readModeAP.ONE | ||
* @see {@link module:aerospike/policy.readModeAP} for supported policy values. | ||
*/ | ||
this.linearizeRead = props.linearizeRead | ||
this.readModeAP = props.readModeAP | ||
/** | ||
* Read policy for SC (strong consistency) namespaces. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.readModeSC.SESSION | ||
* @see {@link module:aerospike/policy.readModeSC} for supported policy values. | ||
*/ | ||
this.readModeSC = props.readModeSC | ||
} | ||
@@ -88,0 +87,0 @@ } |
@@ -70,12 +70,2 @@ // ***************************************************************************** | ||
/** | ||
* Specifies the number of replicas consulted when reading for the desired | ||
* consistency guarantee. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.consistencyLevel.ONE | ||
* @see {@link module:aerospike/policy.consistencyLevel} for supported policy values. | ||
*/ | ||
this.consistencyLevel = props.consistencyLevel | ||
/** | ||
* Specifies the number of replicas required to be committed successfully | ||
@@ -111,9 +101,18 @@ * when writing before returning transaction succeeded. | ||
/** | ||
* Force reads to be linearized for server namespaces that support strong | ||
* consistency (aka CP mode). | ||
* Read policy for AP (availability) namespaces. | ||
* | ||
* @type boolean | ||
* @default <code>false</code> | ||
* @type number | ||
* @default Aerospike.policy.readModeAP.ONE | ||
* @see {@link module:aerospike/policy.readModeAP} for supported policy values. | ||
*/ | ||
this.linearizeRead = props.linearizeRead | ||
this.readModeAP = props.readModeAP | ||
/** | ||
* Read policy for SC (strong consistency) namespaces. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.readModeSC.SESSION | ||
* @see {@link module:aerospike/policy.readModeSC} for supported policy values. | ||
*/ | ||
this.readModeSC = props.readModeSC | ||
} | ||
@@ -120,0 +119,0 @@ } |
// ***************************************************************************** | ||
// Copyright 2013-2017 Aerospike, Inc. | ||
// Copyright 2013-2019 Aerospike, Inc. | ||
// | ||
@@ -54,12 +54,20 @@ // Licensed under the Apache License, Version 2.0 (the "License") | ||
/** | ||
* Specifies the number of replicas consulted when reading for the desired | ||
* consistency guarantee. | ||
* Read policy for AP (availability) namespaces. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.consistencyLevel.ONE | ||
* @see {@link module:aerospike/policy.consistencyLevel} for supported policy values. | ||
* @default Aerospike.policy.readModeAP.ONE | ||
* @see {@link module:aerospike/policy.readModeAP} for supported policy values. | ||
*/ | ||
this.consistencyLevel = props.consistencyLevel | ||
this.readModeAP = props.readModeAP | ||
/** | ||
* Read policy for SC (strong consistency) namespaces. | ||
* | ||
* @type number | ||
* @default Aerospike.policy.readModeSC.SESSION | ||
* @see {@link module:aerospike/policy.readModeSC} for supported policy values. | ||
*/ | ||
this.readModeSC = props.readModeSC | ||
/** | ||
* Should CDT data types (Lists / Maps) be deserialized to JS data types | ||
@@ -73,11 +81,2 @@ * (Arrays / Objects) or returned as raw bytes (Buffer). | ||
this.deserialize = props.deserialize | ||
/** | ||
* Force reads to be linearized for server namespaces that support strong | ||
* consistency (aka CP mode). | ||
* | ||
* @type boolean | ||
* @default <code>false</code> | ||
*/ | ||
this.linearizeRead = props.linearizeRead | ||
} | ||
@@ -84,0 +83,0 @@ } |
// ***************************************************************************** | ||
// Copyright 2013-2018 Aerospike, Inc. | ||
// Copyright 2013-2019 Aerospike, Inc. | ||
// | ||
@@ -73,5 +73,2 @@ // Licensed under the Apache License, Version 2.0 (the "License") | ||
* success in a write operation to provide the desired consistency guarantee. | ||
* * {@link module:aerospike/policy.consistencyLevel|consistencyLevel} - | ||
* Specifies the number of replicas to be consulted in a read operation to | ||
* provide the desired consistency guarantee. | ||
* * {@link module:aerospike/policy.exists|exists} - Specifies the behavior for | ||
@@ -83,2 +80,6 @@ * writing the record depending whether or not it exists. | ||
* whether keys or digests should be sent to the cluster. | ||
* * {@link module:aerospike/policy.readModeAP|readModeAP} - How duplicates | ||
* should be consulted in a read operation. | ||
* * {@link module:aerospike/policy.readModeSC|readModeSC} - Determines SC read | ||
* consistency options. | ||
* * {@link module:aerospike/policy.replica|replica} - Specifies which | ||
@@ -198,13 +199,35 @@ * partition replica to read from. | ||
/** | ||
* Specifies the number of replicas to be consulted in a read operation to | ||
* provide the desired consistency guarantee. | ||
* @summary Read policy for AP (availability) namespaces. | ||
* | ||
* @description How duplicates should be consulted in a read operation. | ||
* Only makes a difference during migrations and only applicable in AP mode. | ||
* | ||
* @type Object | ||
* | ||
* @property ONE - Involve a single replica in the operation. | ||
* @property ALL - Involve all replicas in the operation. | ||
* @property ONE - Involve a single node in the read operation. | ||
* @property ALL - Involve all duplicates in the read operation. | ||
*/ | ||
exports.consistencyLevel = as.policy.consistencyLevel | ||
exports.readModeAP = as.policy.readModeAP | ||
/** | ||
* @summary Read policy for SC (strong consistency) namespaces. | ||
* | ||
* @description Determines SC read consistency options. | ||
* | ||
* @type Object | ||
* | ||
* @property SESSION - Ensures this client will only see an increasing sequence | ||
* of record versions. Server only reads from master. This is the default. | ||
* @property LINEARIZE - Ensures ALL clients will only see an increasing | ||
* sequence of record versions. Server only reads from master. | ||
* @property ALLOW_REPLICA - Server may read from master or any full | ||
* (non-migrating) replica. Increasing sequence of record versions is not | ||
* guaranteed. | ||
* @property ALLOW_UNAVAILABLE - Server may read from master or any full | ||
* (non-migrating) replica or from unavailable partitions. Increasing sequence | ||
* of record versions is not guaranteed. | ||
*/ | ||
exports.readModeSC = as.policy.readModeSC | ||
/** | ||
* Specifies the number of replicas required to be successfully committed | ||
@@ -211,0 +234,0 @@ * before returning success in a write operation to provide the desired |
// ***************************************************************************** | ||
// Copyright 2013-2017 Aerospike, Inc. | ||
// Copyright 2013-2019 Aerospike, Inc. | ||
// | ||
@@ -521,3 +521,3 @@ // Licensed under the Apache License, Version 2.0 (the 'License') | ||
case exports.ERR_CLUSTER: | ||
return 'Generic cluster discovery & connection error.' | ||
return 'Partition is unavailable.' | ||
@@ -524,0 +524,0 @@ case exports.ERR_BIN_INCOMPATIBLE_TYPE: |
{ | ||
"name": "aerospike", | ||
"version": "3.9.0", | ||
"version": "3.10.0", | ||
"description": "Aerospike Client Library", | ||
@@ -49,13 +49,13 @@ "keywords": [ | ||
"choma": "^1.2.1", | ||
"codecov": "^3.1.0", | ||
"deep-eql": "^3.0.1", | ||
"codecov": "^3.3.0", | ||
"deep-eql": "^4.0.0", | ||
"dirty-chai": "^2.0.1", | ||
"ink-docstrap": "^1.3.0", | ||
"jsdoc": "^3.5.5", | ||
"mocha": "^5.2.0", | ||
"mocha": "^6.1.1", | ||
"mocha-clean": "^1.0.0", | ||
"nyc": "^13.3.0", | ||
"semver": "^5.0.0", | ||
"semver": "^6.0.0", | ||
"standard": "^12.0", | ||
"tmp": "^0.0.33", | ||
"tmp": "^0.1", | ||
"yargs": "^1.3.3" | ||
@@ -62,0 +62,0 @@ }, |
@@ -102,3 +102,4 @@ // ***************************************************************************** | ||
replica: Aerospike.policy.replica.MASTER, | ||
consistencyLevel: Aerospike.policy.consistencyLevel.ONE | ||
readModeAP: Aerospike.policy.readModeAP.ONE, | ||
readModeSC: Aerospike.policy.readModeSC.SESSION | ||
}) | ||
@@ -111,3 +112,4 @@ | ||
expect(subject.replica).to.equal(Aerospike.policy.replica.MASTER) | ||
expect(subject.consistencyLevel).to.equal(Aerospike.policy.consistencyLevel.ONE) | ||
expect(subject.readModeAP).to.equal(Aerospike.policy.readModeAP.ONE) | ||
expect(subject.readModeSC).to.equal(Aerospike.policy.readModeSC.SESSION) | ||
}) | ||
@@ -124,3 +126,4 @@ }) | ||
maxRetries: 1, | ||
consistencyLevel: Aerospike.policy.consistencyLevel.ONE, | ||
readModeAP: Aerospike.policy.readModeAP.ONE, | ||
readModeSC: Aerospike.policy.readModeSC.SESSION, | ||
allowInline: false, | ||
@@ -133,3 +136,4 @@ sendSetName: true | ||
expect(subject.maxRetries).to.equal(1) | ||
expect(subject.consistencyLevel).to.equal(Aerospike.policy.consistencyLevel.ONE) | ||
expect(subject.readModeAP).to.equal(Aerospike.policy.readModeAP.ONE) | ||
expect(subject.readModeSC).to.equal(Aerospike.policy.readModeSC.SESSION) | ||
expect(subject.allowInline).to.be.false() | ||
@@ -193,3 +197,4 @@ expect(subject.sendSetName).to.be.true() | ||
replica: Aerospike.policy.replica.MASTER, | ||
consistencyLevel: Aerospike.policy.consistencyLevel.ONE, | ||
readModeAP: Aerospike.policy.readModeAP.ONE, | ||
readModeSC: Aerospike.policy.readModeSC.SESSION, | ||
commitLevel: 2, | ||
@@ -204,3 +209,4 @@ durableDelete: true | ||
expect(subject.replica).to.equal(Aerospike.policy.replica.MASTER) | ||
expect(subject.consistencyLevel).to.equal(Aerospike.policy.consistencyLevel.ONE) | ||
expect(subject.readModeAP).to.equal(Aerospike.policy.readModeAP.ONE) | ||
expect(subject.readModeSC).to.equal(Aerospike.policy.readModeSC.SESSION) | ||
expect(subject.commitLevel).to.equal(2) | ||
@@ -207,0 +213,0 @@ expect(subject.durableDelete).to.be.true() |
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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1507280
30104