Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                
Skip to content

Commit e75fbe6

Browse files
committed
use timestamp in GIDs
1 parent 62e1084 commit e75fbe6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

multimaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4598,7 +4598,7 @@ static void
45984598
MtmGenerateGid(char* gid)
45994599
{
46004600
static int localCount;
4601-
sprintf(gid, "MTM-%d-%d-%d", MtmNodeId, MyProcPid, ++localCount);
4601+
sprintf(gid, "MTM-%d-%d-%d-%ld", MtmNodeId, MyProcPid, ++localCount, (int64) GetCurrentTimestamp());
46024602
}
46034603

46044604
/*

multimaster.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
#define MULTIMASTER_SLOT_PATTERN "mtm_slot_%d"
6565
#define MULTIMASTER_MIN_PROTO_VERSION 1
6666
#define MULTIMASTER_MAX_PROTO_VERSION 1
67-
#define MULTIMASTER_MAX_GID_SIZE 32
67+
#define MULTIMASTER_MAX_GID_SIZE 42
6868
#define MULTIMASTER_MAX_SLOT_NAME_SIZE 16
6969
#define MULTIMASTER_MAX_CONN_STR_SIZE 128
7070
#define MULTIMASTER_MAX_HOST_NAME_SIZE 64

0 commit comments

Comments
 (0)