Update shardPlacement->nodeId to uint

As the source of the shardPlacement->nodeId is always workerNode->nodeId,
and that is uint32.

We had this hack because of: 0ea4e52df5 (r266421409)

And, that is gone with: 90056f7d3c (diff-c532177d74c72d3f0e7cd10e448ab3c6L1123)

So, we're safe to do it now.
pull/3413/head
Onder Kalaci 2020-01-22 18:16:04 +01:00
parent d42b0f7c19
commit a0dff301c7
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;