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 2.4.4 to 2.5.0

src/main/client/truncate.cc

2

benchmarks/alerts.js
// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -180,4 +180,7 @@ // Licensed under the Apache License, Version 2.0 (the "License")

return function (err) {
if (err) err
l(client, r)
if (err) {
return err
} else {
l(client, r)
}
}

@@ -184,0 +187,0 @@ }, done)()

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

@@ -16,3 +16,3 @@ {

"dependencies": {
"aerospike": ">0",
"aerospike": "^2.4",
"yargs": ">=1.2.1",

@@ -19,0 +19,0 @@ "sleep": "^3.0.0"

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

@@ -0,1 +1,20 @@

v2.5.0 / 2017-04-05
===================
This is the last release to support Node.js v0.12 and io.js. The next client release will require Node.js v4 or later.
* **New Features**
* Support ns/set truncate command [#712](https://github.com/aerospike/aerospike-client-nodejs/issues/172)
* Support configurable scan socket write timeout [#174](https://github.com/aerospike/aerospike-client-nodejs/issues/174)
* **Bug Fixes**
* Possible memory leak during batchRead - fix included in Aerospike C client v4.1.5 [#167](https://github.com/aerospike/aerospike-client-nodejs/issues/167)
* Query/scan policy not getting applied on some operations [#175](https://github.com/aerospike/aerospike-client-nodejs/issues/175)
* **Updates**
* Update C client library to [v4.1.5](http://www.aerospike.com/download/client/c/notes.html#4.1.5).
* Update npm install script to support additional Linux distros [#166](https://github.com/aerospike/aerospike-client-nodejs/issues/166), [#170](https://github.com/aerospike/aerospike-client-nodejs/issues/170)
* Update to JavaScript Standard Style v9 [#178](https://github.com/aerospike/aerospike-client-nodejs/pull/178)
* Add WebWorker based test case to scan stress test [#180](https://github.com/aerospike/aerospike-client-nodejs/pull/180)
v2.4.4 / 2016-12-19

@@ -2,0 +21,0 @@ ===================

@@ -12,3 +12,3 @@ {

"footer": "<div style=\"text-align: center\">High performance NoSQL database delivering speed at scale - <a href=\"http://www.aerospike.com/\">Aerospike.com</a></div>",
"copyright": "© 2013-2016 Aerospike, Inc.",
"copyright": "© 2013-2017 Aerospike, Inc.",
"navType": "vertical",

@@ -15,0 +15,0 @@ "theme": "simplex",

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

* @property gen.EQ - Write a record, ONLY if generations are equal.
* @propery gen.GT - Write a record, ONLY if local generation is greater than
* @property gen.GT - Write a record, ONLY if local generation is greater than
* remote generation.

@@ -318,0 +318,0 @@ *

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the 'License')

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the 'License')

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -47,7 +47,13 @@ // Licensed under the Apache License, Version 2.0 (the "License")

var timer = null
var callbackCalled = false
var poll = function () {
statusFunction(function (err, done) {
if (err || done) {
if (timer) clearInterval(timer)
callback(err)
if (timer) {
clearInterval(timer)
}
if (callbackCalled === false) {
callback(err)
callbackCalled = true
}
} else if (!timer) {

@@ -54,0 +60,0 @@ timer = setInterval(poll, pollInterval)

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

} else {
return
throw new Error('LargeList.findRange expects either 3 or 4 arguments')
}

@@ -387,0 +387,0 @@ }

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

const HOST_RE = /^(\[[0-9a-f:]+\]|(?:\d{1,3}\.){3}\d{1,3}|[a-z][a-z0-9\-\.]+)(?::([a-z][a-z0-9\-\.]+))?(?::(\d+))?$/i
const HOST_RE = /^(\[[0-9a-f:]+]|(?:\d{1,3}\.){3}\d{1,3}|[a-z][a-z0-9\-.]+)(?::([a-z][a-z0-9\-.]+))?(?::(\d+))?$/i

@@ -23,3 +23,3 @@ function parseHostString (hostString) {

if (!parts) {
throw new Error('Invalid host address: ' + host)
throw new Error('Invalid host address: ' + hostString)
}

@@ -26,0 +26,0 @@ var host = {}

{
"name": "aerospike",
"version": "2.4.4",
"version": "2.5.0",
"description": "Aerospike Client Library",

@@ -42,3 +42,3 @@ "tags": [

"yargs": "1.2.1",
"standard": "^7.0",
"standard": "^9.0",
"deasync": "^0.1.4",

@@ -48,2 +48,5 @@ "jsdoc": "^3.4.0",

},
"optionalDependencies": {
"webworker-threads": "^0.7"
},
"standard": {

@@ -50,0 +53,0 @@ "ignore": [

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

function constant (metadata) {
return function (key) {
return function () {
return metadata

@@ -24,0 +24,0 @@ }

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

function constant (bins) {
return function (key, metadata) {
return function () {
return bins

@@ -31,3 +31,3 @@ }

function record (bins) {
return function (key, metadata) {
return function () {
var out = {}

@@ -34,0 +34,0 @@ for (var bin in bins) {

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -45,4 +45,10 @@ // Licensed under the Apache License, Version 2.0 (the "License")

if (err) {
callback(err)
} else {
switch (err.code) {
case Aerospike.status.AEROSPIKE_ERR_INDEX_NOT_FOUND:
callback(null, false)
break
default:
callback(err)
}
} else if (info.length > 0) {
var done = info.every(function (response) {

@@ -54,6 +60,8 @@ var stats = Info.parseInfo(response.info)[sindex]

callback(null, done)
} else {
callback(null, false)
}
})
}
Job.pollUntilDone(checkStatus, 1000, function (err) {
Job.pollUntilDone(checkStatus, 10, function (err) {
if (err) throw err

@@ -167,3 +175,3 @@ callback()

client.indexCreateWait(helper.namespace, testIndex.name, 100, function (err) {
client.indexCreateWait(helper.namespace, testIndex.name, 10, function (err) {
expect(err).not.to.be.ok()

@@ -170,0 +178,0 @@ verifyIndexExists(helper.namespace, testIndex.name, done)

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -34,29 +34,11 @@ // Licensed under the Apache License, Version 2.0 (the "License")

it('should write and validate 100 records', function (done) {
// counters
var total = 100
var count = 0
// generators
var kgen = keygen.string(helper.namespace, helper.set, {prefix: 'test/put/'})
var mgen = metagen.constant({ttl: 1000})
var rgen = recgen.record({i: valgen.integer(), s: valgen.string(), b: valgen.bytes()})
function iteration () {
// values
var key = kgen()
var meta = mgen(key)
var record = rgen(key, meta)
// write the record then check
client.put(key, record, meta, function (err, key) {
expect(err).not.to.be.ok()
client.get(key, function (err, _record, _metadata, _key) {
if (err) { throw new Error(err.message) }
expect(_record).to.eql(record)
count++
if (count >= total) {
done()
}
it('should write and validate records', function (done) {
var meta = {ttl: 1000, exists: Aerospike.policy.exists.CREATE_OR_REPLACE}
var putAndGet = function (key, recordPut, cb) {
client.put(key, recordPut, meta, function (err) {
if (err) throw err
client.get(key, function (err, recordGot) {
if (err) throw err
expect(recordPut).to.eql(recordGot)
cb()
})

@@ -66,4 +48,14 @@ })

var kgen = keygen.string(helper.namespace, helper.set, {prefix: 'test/put/putAndGet/'})
var rgen = recgen.record({i: valgen.integer(), s: valgen.string(), b: valgen.bytes()})
var total = 50
var count = 0
for (var i = 0; i < total; i++) {
iteration()
putAndGet(kgen(), rgen(), function () {
count++
if (count === total) {
done()
}
})
}

@@ -189,9 +181,21 @@ })

it('writes bin with object value as map and reads it back', function (done) {
var record = { map: { a: 1, b: 'foo', c: 1.23, d: new Double(3.14),
e: new Buffer('bar'), f: GeoJSON.Point(103.8, 1.283), g: [1, 2, 3],
var record = { map: {
a: 1,
b: 'foo',
c: 1.23,
d: new Double(3.14),
e: new Buffer('bar'),
f: GeoJSON.Point(103.8, 1.283),
g: [1, 2, 3],
h: { a: 1, b: 2 } }
}
var expected = { map: { a: 1, b: 'foo', c: 1.23, d: 3.14,
e: new Buffer('bar'), f: '{"type":"Point","coordinates":[103.8,1.283]}',
g: [1, 2, 3], h: { a: 1, b: 2 } }
var expected = { map: {
a: 1,
b: 'foo',
c: 1.23,
d: 3.14,
e: new Buffer('bar'),
f: '{"type":"Point","coordinates":[103.8,1.283]}',
g: [1, 2, 3],
h: { a: 1, b: 2 } }
}

@@ -206,4 +210,11 @@ putGetVerify(record, expected, done)

}
var expected = { map: { a: 1, b: 'foo', c: 1.23, d: 3.14, e: new Buffer('bar'),
f: '{"type":"Point","coordinates":[103.8,1.283]}', g: [1, 2, 3], h: { a: 1, b: 2 } }
var expected = { map: {
a: 1,
b: 'foo',
c: 1.23,
d: 3.14,
e: new Buffer('bar'),
f: '{"type":"Point","coordinates":[103.8,1.283]}',
g: [1, 2, 3],
h: { a: 1, b: 2 } }
}

@@ -210,0 +221,0 @@ putGetVerify(record, expected, done)

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

helper.index.create(idx[0], testSet, idx[1], idx[2], idx[3], function () {
if (++created >= indexes.length) done()
if (++created >= indexes.length) {
done()
}
})

@@ -123,0 +125,0 @@ })

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

var mgen = metagen.constant({ ttl: 300 })
var policy = { key: Aerospike.policy.key.SEND, exists: Aerospike.policy.exists.CREATE_OR_REPLACE, timeout: 1000 }
var policy = {
key: Aerospike.policy.key.SEND,
exists: Aerospike.policy.exists.CREATE_OR_REPLACE,
timeout: 1000
}
putgen.put(numberOfRecords, kgen, rgen, mgen, policy, function (key) {

@@ -124,2 +128,15 @@ if (!key) done()

it('sets a scan policy', function (done) {
var scan = client.scan(helper.namespace, testSet)
var scanPolicy = {
timeout: 1000,
socketTimeout: 1000,
durableDelete: true,
failOnClusterChange: true
}
var stream = scan.foreach(scanPolicy)
stream.on('data', function () { stream.abort() })
stream.on('end', done)
})
context('with nobins set to true', function () {

@@ -126,0 +143,0 @@ it('should return only meta data', function (done) {

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

}
// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

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

var numberOfRecords = 1e6 // 1 Mio. records at 1 kb ≈ 1 GB total data size
var webWorkerThreads = 10 // number of WebWorker threads to use
var reportingInterval = 10000 // report progress every 10 seconds

@@ -44,3 +46,3 @@ // Execute scan using given onData handler to process each scanned record

var received = 0
var timer = perfdata.interval(10000, function (ms) {
var timer = perfdata.interval(reportingInterval, function (ms) {
var throughput = Math.round(1000 * received / ms)

@@ -51,3 +53,3 @@ var memUsage = process.memoryUsage()

var heapTotal = Math.round(memUsage.heapTotal / mega)
console.log('%d ms: %d records scanned (%d rps; mem: %d MB, heap: %d / %d MB)',
console.log('%d ms: %d records received (%d rps; mem: %d MB, heap: %d / %d MB)',
ms, received, throughput, rss, heapUsed, heapTotal)

@@ -104,2 +106,39 @@ })

it('scans ' + numberOfRecords + ' records with busy loop in WebWorker', function (done) {
try {
var Worker = require('webworker-threads')
} catch (err) {
console.error('gem install webworker-threads to run this test!')
this.skip('gem install webworker-threads to run this test!')
return
}
function doWork () {
for (var x = 0; x < 1e5; x++) {} // busy loop
}
var threadPool = Worker.createPool(webWorkerThreads).all.eval(doWork)
console.log('created WebWorker pool with %s threads', webWorkerThreads)
var processed = 0
var timer = perfdata.interval(reportingInterval, function (ms) {
var throughput = Math.round(1000 * processed / ms)
var memUsage = process.memoryUsage()
var rss = Math.round(memUsage.rss / mega)
var heapUsed = Math.round(memUsage.heapUsed / mega)
var heapTotal = Math.round(memUsage.heapTotal / mega)
console.log('%d ms: %d records processed (%d rps; mem: %d MB, heap: %d / %d MB)',
ms, processed, throughput, rss, heapUsed, heapTotal)
})
var worker = function (record, meta, key) {
threadPool.any.eval('doWork()', function (err) {
if (err) throw err
if (++processed === numberOfRecords) {
timer.call()
timer.clear()
threadPool.destroy()
done()
}
})
}
executeScan(worker, function () {})
})
it('scans ' + numberOfRecords + ' records with file IO', function (done) {

@@ -106,0 +145,0 @@ var file = 'scan-stress-test.log'

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -81,6 +81,9 @@ // Licensed under the Apache License, Version 2.0 (the "License")

if (err) throw err
job.waitUntilDone(100, function (err) {
if (err) throw err
callback()
})
// TODO: Remove delay once AER-5450 is fixed server-side
setTimeout(function () {
job.waitUntilDone(10, function (err) {
if (err) throw err
callback()
})
}, 150)
})

@@ -96,2 +99,3 @@ }

this.edition = 'community'
this.build = ''
this.nsconfig = {}

@@ -113,5 +117,9 @@ this.cluster = []

ServerInfoHelper.prototype.build_gte = function (minVer) {
return semverCmp(this.build, minVer) >= 0
}
ServerInfoHelper.prototype.fetch_info = function (done) {
var self = this
client.infoAll('edition\nfeatures', function (err, results) {
client.infoAll('build\nedition\nfeatures', function (err, results) {
if (err) throw err

@@ -121,2 +129,3 @@ results.forEach(function (response) {

self.edition = info['edition']
self.build = info['build']
var features = info['features']

@@ -188,1 +197,15 @@ if (Array.isArray(features)) {

})
function semverCmp (a, b) {
var pa = a.split('.')
var pb = b.split('.')
for (var i = 0; i < 4; i++) {
var na = Number(pa[i])
var nb = Number(pb[i])
if (na > nb) return 1
if (nb > na) return -1
if (!isNaN(na) && isNaN(nb)) return 1
if (isNaN(na) && !isNaN(nb)) return -1
}
return 0
}
// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2013-2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

// *****************************************************************************
// Copyright 2016 Aerospike, Inc.
// Copyright 2013-2017 Aerospike, Inc.
//

@@ -4,0 +4,0 @@ // Licensed under the Apache License, Version 2.0 (the "License")

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

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 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 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 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 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