diff --git a/src/backend/distributed/utils/attribute.c b/src/backend/distributed/utils/attribute.c index 8dd222205..db5a5d0cb 100644 --- a/src/backend/distributed/utils/attribute.c +++ b/src/backend/distributed/utils/attribute.c @@ -207,6 +207,11 @@ AttributeQueryIfAnnotated(const char *query_string, CmdType commandType) void AttributeTask(char *tenantId, int colocationId, CmdType commandType) { + if (tenantId == NULL || colocationId == INVALID_COLOCATION_ID) + { + return; + } + colocationGroupId = colocationId; strcpy_s(attributeToTenant, sizeof(attributeToTenant), tenantId); attributeCommandType = commandType;