From ae674617cd01bf460151fa910c00dc4b053262d5 Mon Sep 17 00:00:00 2001 From: Brian Nichols Date: Thu, 9 Jan 2025 20:02:49 -0500 Subject: [PATCH] CLIENT-3259 Add AEROSPIKE_MRT_ALREADY_LOCKED and AEROSPIKE_MRT_MONITOR_EXISTS error codes. --- src/include/aerospike/as_status.h | 10 ++++++++++ src/main/aerospike/as_error.c | 2 ++ 2 files changed, 12 insertions(+) diff --git a/src/include/aerospike/as_status.h b/src/include/aerospike/as_status.h index 2fba12755..28a55fc47 100644 --- a/src/include/aerospike/as_status.h +++ b/src/include/aerospike/as_status.h @@ -456,6 +456,16 @@ typedef enum as_status_e { */ AEROSPIKE_MRT_ABORTED = 125, + /** + * This record has been locked by a previous update in this transaction. + */ + AEROSPIKE_MRT_ALREADY_LOCKED = 126, + + /** + * This transaction has already started. Writing to the same transaction with independent threads is unsafe. + */ + AEROSPIKE_MRT_MONITOR_EXISTS = 127, + /** * Batch functionality has been disabled. */ diff --git a/src/main/aerospike/as_error.c b/src/main/aerospike/as_error.c index a015fd653..01a35a7bf 100644 --- a/src/main/aerospike/as_error.c +++ b/src/main/aerospike/as_error.c @@ -111,6 +111,8 @@ as_error_string(as_status status) CASE_ASSIGN(AEROSPIKE_MRT_TOO_MANY_WRITES); CASE_ASSIGN(AEROSPIKE_MRT_COMMITTED); CASE_ASSIGN(AEROSPIKE_MRT_ABORTED); + CASE_ASSIGN(AEROSPIKE_MRT_ALREADY_LOCKED); + CASE_ASSIGN(AEROSPIKE_MRT_MONITOR_EXISTS); CASE_ASSIGN(AEROSPIKE_ERR_BATCH_DISABLED); CASE_ASSIGN(AEROSPIKE_ERR_BATCH_MAX_REQUESTS_EXCEEDED); CASE_ASSIGN(AEROSPIKE_ERR_BATCH_QUEUES_FULL);