mirror of https://github.com/citusdata/citus.git
Add operation name for drop
parent
ce3ae8ff81
commit
21028434ce
|
@ -582,9 +582,13 @@ TryLockRelationAndPlacementCleanup(Oid relationId, LOCKMODE lockmode)
|
||||||
static bool
|
static bool
|
||||||
TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nodePort)
|
TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nodePort)
|
||||||
{
|
{
|
||||||
ereport(LOG, (errmsg("dropping shard placement %s "
|
char *operation = (CurrentOperationId == INVALID_OPERATION_ID) ? "move" : "cleanup";
|
||||||
|
ereport(LOG, (errmsg("dropping shard %s for %s "
|
||||||
"on %s:%d",
|
"on %s:%d",
|
||||||
qualifiedTableName, nodeName, nodePort)));
|
qualifiedTableName,
|
||||||
|
operation,
|
||||||
|
nodeName,
|
||||||
|
nodePort)));
|
||||||
|
|
||||||
/* prepare sql query to execute to drop the shard */
|
/* prepare sql query to execute to drop the shard */
|
||||||
StringInfo dropQuery = makeStringInfo();
|
StringInfo dropQuery = makeStringInfo();
|
||||||
|
@ -603,8 +607,7 @@ TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nod
|
||||||
dropQuery->data);
|
dropQuery->data);
|
||||||
|
|
||||||
/* remove the shard from the node */
|
/* remove the shard from the node */
|
||||||
bool success = true;
|
bool success = SendOptionalCommandListToWorkerOutsideTransaction(nodeName,
|
||||||
SendOptionalCommandListToWorkerOutsideTransaction(nodeName,
|
|
||||||
nodePort,
|
nodePort,
|
||||||
NULL,
|
NULL,
|
||||||
dropCommandList);
|
dropCommandList);
|
||||||
|
|
Loading…
Reference in New Issue