Skip to content

Commit 28328d0

Browse files
Xiztbadrishc
andauthored
Server side transaction failure in Cluster Mode (#702)
* Removing IClusterSession as it can be fetched through respserver session. It's not set and results in object reference null exception for cluster mode transactions * Version bumped. --------- Co-authored-by: Badrish Chandramouli <[email protected]>
1 parent 748ec9a commit 28328d0

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

.azure/pipelines/azure-pipelines-external-release.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
# 1) update the name: string below (line 6) -- this is the version for the nuget package (e.g. 1.0.0)
44
# 2) update \libs\host\GarnetServer.cs readonly string version (~line 53) -- NOTE - these two values need to be the same
55
######################################
6-
name: 1.0.29
6+
name: 1.0.30
77
trigger:
88
branches:
99
include:

libs/host/GarnetServer.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public class GarnetServer : IDisposable
5252
protected StoreWrapper storeWrapper;
5353

5454
// IMPORTANT: Keep the version in sync with .azure\pipelines\azure-pipelines-external-release.yml line ~6.
55-
readonly string version = "1.0.29";
55+
readonly string version = "1.0.30";
5656

5757
/// <summary>
5858
/// Resp protocol version

libs/server/Transaction/TransactionManager.cs

-4
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ public sealed unsafe partial class TransactionManager
5757
// Not readonly to avoid defensive copy
5858
GarnetWatchApi<BasicGarnetApi> garnetTxPrepareApi;
5959

60-
// Cluster session
61-
IClusterSession clusterSession;
62-
6360
// Not readonly to avoid defensive copy
6461
LockableGarnetApi garnetTxMainApi;
6562

@@ -118,7 +115,6 @@ internal TransactionManager(
118115
this.logger = logger;
119116

120117
this.respSession = respSession;
121-
this.clusterSession = respSession.clusterSession;
122118

123119
watchContainer = new WatchedKeysContainer(initialSliceBufferSize, functionsState.watchVersionMap);
124120
keyEntries = new TxnKeyEntries(initialSliceBufferSize, lockableContext, objectStoreLockableContext);

libs/server/Transaction/TxnKeyManager.cs

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ public unsafe void VerifyKeyOwnership(ArgSlice key, LockType type)
3131
if (!clusterEnabled) return;
3232

3333
bool readOnly = type == LockType.Shared;
34-
if (!clusterSession.CheckSingleKeySlotVerify(key, readOnly, respSession.SessionAsking))
34+
if (!respSession.clusterSession.CheckSingleKeySlotVerify(key, readOnly, respSession.SessionAsking))
3535
{
3636
this.state = TxnState.Aborted;
3737
return;

0 commit comments

Comments
 (0)