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
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",
qualifiedTableName, nodeName, nodePort)));
qualifiedTableName,
operation,
nodeName,
nodePort)));
/* prepare sql query to execute to drop the shard */
StringInfo dropQuery = makeStringInfo();
@ -603,8 +607,7 @@ TryDropShardOutsideTransaction(char *qualifiedTableName, char *nodeName, int nod
dropQuery->data);
/* remove the shard from the node */
bool success = true;
SendOptionalCommandListToWorkerOutsideTransaction(nodeName,
bool success = SendOptionalCommandListToWorkerOutsideTransaction(nodeName,
nodePort,
NULL,
dropCommandList);