From f1a462941b13151a90642ab61cb58681d6554614 Mon Sep 17 00:00:00 2001 From: Shannon Klaus Date: Mon, 13 Jan 2025 15:15:51 -0700 Subject: [PATCH] CLIENT-3262: Add MRT_ALREADY_LOCKED and MRT_MONITOR_EXISTS error codes (#146) --- AerospikeClient/Main/ResultCode.cs | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/AerospikeClient/Main/ResultCode.cs b/AerospikeClient/Main/ResultCode.cs index 65b6924e..e33575c0 100644 --- a/AerospikeClient/Main/ResultCode.cs +++ b/AerospikeClient/Main/ResultCode.cs @@ -487,8 +487,20 @@ public sealed class ResultCode /// MRT was already aborted. /// Value: 125 /// - public const int MRT_ABORTED = 125; - + public const int MRT_ABORTED = 125; + + /// + /// This record has been locked by a previous update in this transaction. + /// Value: 126 + /// + public const int MRT_ALREADY_LOCKED = 126; + + /// + /// This transaction has already started. Writing to the same transaction with independent threads is unsafe. + /// Value: 127 + /// + public const int MRT_MONITOR_EXISTS = 127; + /// /// Batch functionality has been disabled. /// Value: 150 @@ -834,8 +846,14 @@ public static string GetResultString(int resultCode) return "MRT already committed"; case MRT_ABORTED: - return "MRT already aborted"; - + return "MRT already aborted"; + + case MRT_ALREADY_LOCKED: + return "This record has been locked by a previous update in this transaction"; + + case MRT_MONITOR_EXISTS: + return "This transaction has already started. Writing to the same transaction with independent threads is unsafe"; + case BATCH_DISABLED: return "Batch functionality has been disabled";