Fix test failure

pull/6029/head
Nitish Upreti 2022-07-12 15:54:04 -07:00
parent 6fc7544f18
commit 8244db7d7c
2 changed files with 10 additions and 8 deletions

View File

@ -27,7 +27,7 @@
/* declarations for dynamic loading */ /* declarations for dynamic loading */
PG_FUNCTION_INFO_V1(citus_split_shard_by_split_points); PG_FUNCTION_INFO_V1(citus_split_shard_by_split_points);
static SplitMode LookupSplitMode(Oid shardSplitModeOid); static SplitMode LookupSplitMode(Oid shardTransferModeOid);
/* /*
* citus_split_shard_by_split_points(shard_id bigint, split_points text[], node_ids integer[], shard_transfer_mode citus.shard_transfer_mode) * citus_split_shard_by_split_points(shard_id bigint, split_points text[], node_ids integer[], shard_transfer_mode citus.shard_transfer_mode)
@ -82,16 +82,18 @@ LookupSplitMode(Oid shardTransferModeOid)
shardSplitMode = BLOCKING_SPLIT; shardSplitMode = BLOCKING_SPLIT;
} }
else if (strncmp(enumLabel, "auto", NAMEDATALEN) == 0 || else if (strncmp(enumLabel, "auto", NAMEDATALEN) == 0 ||
strncmp(enumLabel, "force_logical", NAMEDATALEN) == 0) strncmp(enumLabel, "force_logical", NAMEDATALEN) == 0)
{ {
ereport(ERROR, (errmsg("Shard Tranfer mode: '%s' is not supported. Please use 'block_writes' instead.", ereport(ERROR, (errmsg(
enumLabel))); "Shard Tranfer mode: '%s' is not supported. Please use 'block_writes' instead.",
enumLabel)));
} }
else else
{ {
// We will not get here as postgres will validate the enum value. /* We will not get here as postgres will validate the enum value. */
ereport(ERROR, (errmsg("Invalid shard tranfer mode: '%s'. Expected split mode is 'block_writes'.", ereport(ERROR, (errmsg(
enumLabel))); "Invalid shard tranfer mode: '%s'. Expected split mode is 'block_writes'.",
enumLabel)));
} }
return shardSplitMode; return shardSplitMode;

View File

@ -289,5 +289,5 @@ ORDER BY 1;
view columnar.stripe view columnar.stripe
view pg_dist_shard_placement view pg_dist_shard_placement
view time_partitions view time_partitions
(274 rows) (273 rows)