Skip to content

Commit 14a9ad8

Browse files
knizhnikkelvich
authored andcommitted
Support unique sequences through XTM
1 parent 3aa2630 commit 14a9ad8

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

multimaster.c

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ static char const* MtmGetName(void);
133133
static size_t MtmGetTransactionStateSize(void);
134134
static void MtmSerializeTransactionState(void* ctx);
135135
static void MtmDeserializeTransactionState(void* ctx);
136+
static void MtmInitializeSequence(int64* start, int64* step);
136137

137138
static void MtmCheckClusterLock(void);
138139
static void MtmCheckSlots(void);
@@ -170,7 +171,8 @@ static TransactionManager MtmTM = {
170171
MtmGetName,
171172
MtmGetTransactionStateSize,
172173
MtmSerializeTransactionState,
173-
MtmDeserializeTransactionState
174+
MtmDeserializeTransactionState,
175+
MtmInitializeSequence
174176
};
175177

176178
char const* const MtmNodeStatusMnem[] =
@@ -348,6 +350,13 @@ MtmDeserializeTransactionState(void* ctx)
348350
}
349351

350352

353+
static void
354+
MtmInitializeSequence(int64* start, int64* step)
355+
{
356+
*start = MtmNodeId;
357+
*step = MtmMaxNodes;
358+
}
359+
351360

352361
/*
353362
* -------------------------------------------

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy