mirror of https://github.com/citusdata/citus.git
Use list_length() != 1 in SingleReplicatedTable().
ShardPlacementList's implementation can return NIL. In previous implementation we got a segmentation fault in this case. The relation can be dropped after getting distributed table list but before calling SingleReplicatedTable().pull/1751/head
parent
7691991cb5
commit
7280774cf4
|
@ -390,7 +390,7 @@ SingleReplicatedTable(Oid relationId)
|
|||
uint64 shardId = (*shardIdPointer);
|
||||
List *shardPlacementList = ShardPlacementList(shardId);
|
||||
|
||||
if (shardPlacementList->length > 1)
|
||||
if (list_length(shardPlacementList) != 1)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue