Merge pull request #3413 from citusdata/int_to_uint

Update shardPlacement->nodeId from `int` to `uint`
pull/3410/head^2
Önder Kalacı 2020-01-23 17:31:16 +01:00 committed by GitHub
commit a227e34c41
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View File

@ -134,7 +134,7 @@ static HTAB *ConnectionPlacementHash;
typedef struct ColocatedPlacementsHashKey typedef struct ColocatedPlacementsHashKey
{ {
/* to identify host - database can't differ */ /* to identify host - database can't differ */
int nodeId; uint32 nodeId;
/* colocation group, or invalid */ /* colocation group, or invalid */
uint32 colocationGroupId; uint32 colocationGroupId;

View File

@ -411,7 +411,7 @@ OutShardPlacement(OUTFUNC_ARGS)
WRITE_INT_FIELD(groupId); WRITE_INT_FIELD(groupId);
WRITE_STRING_FIELD(nodeName); WRITE_STRING_FIELD(nodeName);
WRITE_UINT_FIELD(nodePort); WRITE_UINT_FIELD(nodePort);
WRITE_INT_FIELD(nodeId); WRITE_UINT_FIELD(nodeId);
/* so we can deal with 0 */ /* so we can deal with 0 */
WRITE_INT_FIELD(partitionMethod); WRITE_INT_FIELD(partitionMethod);
WRITE_UINT_FIELD(colocationGroupId); WRITE_UINT_FIELD(colocationGroupId);

View File

@ -321,7 +321,7 @@ ReadShardPlacement(READFUNC_ARGS)
READ_INT_FIELD(groupId); READ_INT_FIELD(groupId);
READ_STRING_FIELD(nodeName); READ_STRING_FIELD(nodeName);
READ_UINT_FIELD(nodePort); READ_UINT_FIELD(nodePort);
READ_INT_FIELD(nodeId); READ_UINT_FIELD(nodeId);
/* so we can deal with 0 */ /* so we can deal with 0 */
READ_INT_FIELD(partitionMethod); READ_INT_FIELD(partitionMethod);
READ_UINT_FIELD(colocationGroupId); READ_UINT_FIELD(colocationGroupId);

View File

@ -81,7 +81,7 @@ typedef struct ShardPlacement
/* the rest of the fields aren't from pg_dist_placement */ /* the rest of the fields aren't from pg_dist_placement */
char *nodeName; char *nodeName;
uint32 nodePort; uint32 nodePort;
int nodeId; uint32 nodeId;
char partitionMethod; char partitionMethod;
uint32 colocationGroupId; uint32 colocationGroupId;
uint32 representativeValue; uint32 representativeValue;