Skip to content

Commit 4ad2dde

Browse files
Merge branch 'dev-CICD' into 2025-Pipeline-Improvement
2 parents 10bd709 + 496c138 commit 4ad2dde

26 files changed

+1671
-508
lines changed

.github/workflows/npm-install-script-test.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,7 @@ jobs:
107107
- name: Publish NPM package
108108
run: jf npm publish --build-name nodejs-client --build-number 6.0.2
109109

110+
110111
#- name: npm publish
111112
# run: |
112113
# npm publish --registry=https://aerospike.jfrog.io/artifactory/api/npm/clients-npm-dev-local/
@@ -115,6 +116,7 @@ jobs:
115116
run: |
116117
jf npm install --build-name nodejs-client --build-number 6.0.2
117118
119+
118120
- name: Simple require test
119121
run: |
120122
node -e "console.log(require('aerospike').batchType)"

.github/workflows/tests.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -396,8 +396,20 @@ jobs:
396396
# Should be ready after 3 seconds
397397
run: sleep 3
398398

399+
- name: install pre-req
400+
run: npm run test-prereq
401+
402+
- name: install mocha
403+
run: |
404+
npm install mocha
405+
npm install typescript --save-dev;
406+
npx tsc;
407+
cp tests/udf.lua dist/udf.lua;
408+
working-directory: ts-test
409+
399410
- name: Run tests
400-
run: npm run valgrind -- --t 40000
411+
run:
412+
npm run valgrind -- --t 40000
401413

402414

403415
# test-typescript:

.github/workflows/upload-to-jfrog.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,9 +70,10 @@ jobs:
7070
run: jf rt upload --build-name nodejs-client --build-number ${{ env.NEW_VERSION }}/ "./lib/binding/*" clients-${{ env.PACKAGE_MANAGER }}-dev-local/aerospike/${{ env.NEW_VERSION }}/
7171
env:
7272
NEW_VERSION: 6.0.2
73-
PACKAGE_MANAGER: npm
73+
7474

7575
- name: Publish build info
7676
if: ${{ inputs.jfrog-repo-name == vars.JFROG_REPO_NAME }}
7777
run: jf rt build-publish nodejs-client 6.0.2
7878

79+

CHANGELOG.md

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,35 @@
22

33
All notable changes to this project will be documented in this file.
44

5+
## [6.0.2]
6+
* **New Features**
7+
* [CLIENT-3243] - Added TXN_ALREADY_COMMITTED and TXN_ALREADY_ABORTED error codes.
8+
* [CLIENT-3267] - Added MRT_ALREADY_LOCKED and MRT_MONITOR_EXISTS error codes.
9+
10+
* **Bug Fixes**
11+
* [CLIENT-3306] - Added the following missing error codes:
12+
* ERR_MAX_RETRIES_EXCEEDED
13+
* MRT_TOO_MANY_WRITES
14+
* NOT_WHITELISTED
15+
* QUOTA_EXCEEDED
16+
17+
* **Improvements**
18+
* [CLIENT-3244] - Removed commitStatus.ALREADY_ABORTED and abortStatus.ALREADY_COMMITTED
19+
* [CLIENT-3277] - Exception is now thrown when aborting a committed transaction.
20+
* [CLIENT-3277] - Exception is now thrown when committing an aborted transaciton.
21+
* [CLIENT-3291] - Default client MRT timeout to zero.
22+
23+
## [6.0.1]
24+
* **Bug Fixes**
25+
* [CLIENT-3235] - Fixed version mismatch with the windows C++ add-on which caused the client to fail on windows.
26+
27+
## [6.0.0]
28+
* **Description**
29+
* The new features in this release require server version 8.0.0 or above.
30+
31+
* **New Features**
32+
* [CLIENT-3181] - Added support for multi-record transactions (MRTs). Requires server version 8.0.0 or above.
33+
534
## [5.13.2]
635
* **Bug Fixes**
736
* [CLIENT-3155] - Fixed typescript compilation by removing the protected modifier from the ExpOperation class.

lib/abort_status.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,6 @@ const abortStatus = as.abortStatus
2121

2222
module.exports = {
2323
OK: abortStatus.OK,
24-
ALREADY_COMMITTED: abortStatus.ALREADY_COMMITTED,
2524
ALREADY_ABORTED: abortStatus.ALREADY_ABORTED,
2625
ROLL_BACK_ABANDONED: abortStatus.ROLL_BACK_ABANDONED,
2726
CLOSE_ABANDONED: abortStatus.CLOSE_ABANDONED

lib/client.js

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ const EventEmitter = require('events')
2222

2323
const as = require('bindings')('aerospike.node')
2424
const AerospikeError = require('./error')
25+
const status = require('./status')
26+
const txnState = require('./txn_state')
2527
const abortStatus = require('./abort_status')
2628
const commitStatus = require('./commit_status')
27-
const txnState = require('./txn_state')
2829
const Transaction = require('./transaction')
2930
const Context = require('./cdt_context')
3031
const Commands = require('./commands')
@@ -220,7 +221,9 @@ Client.prototype.abort = function (transaction, callback) {
220221
_transactionPool.tendTransactions()
221222
if (transaction instanceof Transaction) {
222223
if (transaction.getState() === txnState.COMMITTED) {
223-
return abortStatus.ALREADY_COMMITTED
224+
const err = new AerospikeError('The transaction has already been committed.')
225+
err.code = status.TXN_ALREADY_COMMITTED
226+
throw err
224227
} else if (transaction.getState() === txnState.ABORTED) {
225228
return abortStatus.ALREADY_ABORTED
226229
} else if (transaction.getDestroyed() === true) {
@@ -239,7 +242,9 @@ Client.prototype.commit = function (transaction, callback) {
239242
if (transaction.getState() === txnState.COMMITTED) {
240243
return commitStatus.ALREADY_COMMITTED
241244
} else if (transaction.getState() === txnState.ABORTED) {
242-
return commitStatus.ALREADY_ABORTED
245+
const err = new AerospikeError('The transaction has already been aborted.')
246+
err.code = status.TXN_ALREADY_ABORTED
247+
throw err
243248
} else if (transaction.getDestroyed() === true) {
244249
throw new AerospikeError('The object has been destroyed, please create a new transaction.')
245250
}

lib/commit_status.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,6 @@ const commitStatus = as.commitStatus
2222
module.exports = {
2323
OK: commitStatus.OK,
2424
ALREADY_COMMITTED: commitStatus.ALREADY_COMMITTED,
25-
ALREADY_ABORTED: commitStatus.ALREADY_ABORTED,
2625
VERIFY_FAILED: commitStatus.VERIFY_FAILED,
2726
MARK_ROLL_FORWARD_ABANDONED: commitStatus.MARK_ROLL_FORWARD_ABANDONED,
2827
ROLL_FORWARD_ABANDONED: commitStatus.ROLL_FORWARD_ABANDONED,

0 commit comments

Comments
 (0)