Add operation name for drop

niupre/TestDeferredDropAndCleanup
Nitish Upreti 2022-08-27 20:12:29 -07:00
parent ce3ae8ff81
commit 21028434ce
1 changed files with 7 additions and 4 deletions

View File

@ -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);