mirror of https://github.com/citusdata/citus.git
Reindent
parent
c48bf5ebaa
commit
0620d62373
|
@ -50,7 +50,7 @@
|
||||||
#include "distributed/version_compat.h"
|
#include "distributed/version_compat.h"
|
||||||
#include "distributed/worker_protocol.h"
|
#include "distributed/worker_protocol.h"
|
||||||
|
|
||||||
extern List *FullShardPlacementList(Oid relationId, ArrayType *excludedShardArray);
|
extern List * FullShardPlacementList(Oid relationId, ArrayType *excludedShardArray);
|
||||||
static char * PartitionBound(Oid partitionId);
|
static char * PartitionBound(Oid partitionId);
|
||||||
static Relation try_relation_open_nolock(Oid relationId);
|
static Relation try_relation_open_nolock(Oid relationId);
|
||||||
static List * CreateFixPartitionConstraintsTaskList(Oid relationId);
|
static List * CreateFixPartitionConstraintsTaskList(Oid relationId);
|
||||||
|
@ -558,24 +558,26 @@ CreateFixPartitionShardIndexNames(Oid parentRelationId, Oid partitionRelationId,
|
||||||
|
|
||||||
int taskId = 1;
|
int taskId = 1;
|
||||||
|
|
||||||
List *shardPlacementList = FullShardPlacementList(parentRelationId, construct_empty_array(INT4OID));
|
List *shardPlacementList = FullShardPlacementList(parentRelationId,
|
||||||
|
construct_empty_array(INT4OID));
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
List *workerNodeList = ReadDistNode(true);
|
List *workerNodeList = ReadDistNode(true);
|
||||||
|
|
||||||
/* make sure we have deterministic output for our tests */
|
/* make sure we have deterministic output for our tests */
|
||||||
workerNodeList = SortList(workerNodeList, CompareWorkerNodes);
|
workerNodeList = SortList(workerNodeList, CompareWorkerNodes);
|
||||||
|
|
||||||
MemoryContext localContext = AllocSetContextCreate(CurrentMemoryContext, "CreateFixPartitionShardIndexNames",
|
MemoryContext localContext = AllocSetContextCreate(CurrentMemoryContext,
|
||||||
ALLOCSET_DEFAULT_SIZES);
|
"CreateFixPartitionShardIndexNames",
|
||||||
MemoryContext oldContext = MemoryContextSwitchTo(localContext);
|
ALLOCSET_DEFAULT_SIZES);
|
||||||
|
MemoryContext oldContext = MemoryContextSwitchTo(localContext);
|
||||||
|
|
||||||
WorkerNode *workerNode = NULL;
|
WorkerNode *workerNode = NULL;
|
||||||
foreach_ptr(workerNode, workerNodeList)
|
foreach_ptr(workerNode, workerNodeList)
|
||||||
{
|
{
|
||||||
List *shardsOnNode = FilterActiveShardPlacementListByNode(
|
List *shardsOnNode = FilterActiveShardPlacementListByNode(
|
||||||
shardPlacementList, workerNode);
|
shardPlacementList, workerNode);
|
||||||
|
|
||||||
ShardPlacement *shardPlacement = NULL;
|
ShardPlacement *shardPlacement = NULL;
|
||||||
|
|
||||||
foreach_ptr(shardPlacement, shardsOnNode)
|
foreach_ptr(shardPlacement, shardsOnNode)
|
||||||
|
@ -584,8 +586,8 @@ CreateFixPartitionShardIndexNames(Oid parentRelationId, Oid partitionRelationId,
|
||||||
|
|
||||||
List *queryStringList =
|
List *queryStringList =
|
||||||
WorkerFixPartitionShardIndexNamesCommandList(parentShardId,
|
WorkerFixPartitionShardIndexNamesCommandList(parentShardId,
|
||||||
parentIndexIdList,
|
parentIndexIdList,
|
||||||
partitionRelationId);
|
partitionRelationId);
|
||||||
if (queryStringList != NIL)
|
if (queryStringList != NIL)
|
||||||
{
|
{
|
||||||
Task *task = CitusMakeNode(Task);
|
Task *task = CitusMakeNode(Task);
|
||||||
|
|
|
@ -222,6 +222,6 @@ extern void SetupRebalanceMonitor(List *placementUpdateList,
|
||||||
uint64 initialProgressState,
|
uint64 initialProgressState,
|
||||||
PlacementUpdateStatus initialStatus);
|
PlacementUpdateStatus initialStatus);
|
||||||
|
|
||||||
extern List *FullShardPlacementList(Oid relationId, ArrayType *excludedShardArray);
|
extern List * FullShardPlacementList(Oid relationId, ArrayType *excludedShardArray);
|
||||||
|
|
||||||
#endif /* SHARD_REBALANCER_H */
|
#endif /* SHARD_REBALANCER_H */
|
||||||
|
|
Loading…
Reference in New Issue