Statement Hangs with Status `Warming up codegen`

I am running the following very simple statement:

ALTER TABLE `tmp_opportunitylineitem_156589423` RENAME TO `opportunitylineitem`

It hangs. When I run:

SHOW PROCESSLIST I see the state as Warming up codegen.

What version of memsql are you using? Does it happen every time? Can you share the schema of that probably temp table?

It’s MemSQL 6.8.5.

Schema:

CREATE TABLE `tmp_opportunitylineitem_1565894239` (
  `attributes` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `id` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `opportunityid` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `sortorder` bigint(20) DEFAULT NULL,
  `pricebookentryid` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `product2id` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `productcode` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `name` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `currencyisocode` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `quantity` double DEFAULT NULL,
  `totalprice` double DEFAULT NULL,
  `unitprice` double DEFAULT NULL,
  `listprice` double DEFAULT NULL,
  `servicedate` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `description` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `createddate` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `createdbyid` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `lastmodifieddate` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `lastmodifiedbyid` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `systemmodstamp` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `isdeleted` bigint(20) DEFAULT NULL,
  `tier__c` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `contracted_users__c` double DEFAULT NULL,
  `custom_discount_type__c` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `custom_discount__c` double DEFAULT NULL,
  `non_profit_discount__c` bigint(20) DEFAULT NULL,
  `opportunity_name__c` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `product_name_display__c` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `total_discount_percent__c` double DEFAULT NULL,
  `original_price__c` double DEFAULT NULL,
  `product_type__c` text CHARACTER SET utf8 COLLATE utf8_general_ci,
  `contract_term_months__c` double DEFAULT NULL,
  `pupy_original__c` double DEFAULT NULL,
  `pupy_total__c` double DEFAULT NULL,
  `time` bigint(20) DEFAULT NULL,
  KEY `time` (`time`) /*!90619 USING CLUSTERED COLUMNSTORE */
  /*!90618 , SHARD KEY () */ 
) /*!90621 AUTOSTATS_ENABLED=TRUE */

Seems to happen every time, with every schema we try.

Our workflow creates a pipeline to load data into the table from S3, starts the pipeline in the foreground, then once complete, runs the following:

BEGIN;
            
DROP TABLE IF EXISTS opportunitylineitem;
DROP PIPELINE opportunitylineitem;
ALTER TABLE `tmp_opportunitylineitem_1565894239 ` RENAME TO `opportunitylineitem`;
            
COMMIT;

I can recreate the issue as follows:

CREATE TABLE foo AS SELECT 1 AS col1;
ALTER TABLE foo RENAME TO bar;

~We just tried on 6.8.7 with the same issues.~ [Edit: Server was not upgraded as I thought. I will try again on 6 .8.7 and report back.]

~We are going to revert to 6.7 where everything seems a bit more stable. I have a feeling it has something to do with our new cluster setup, but I’m not sure how to troubleshoot.~

Seems to be OK after the upgrade to 6.8.7. Will update here if I notice anything odd.

Glad it worked, we have fixed a few issues releted to interpret first. I also tested on pre-beta 2 MemSQL 7.0 and it worked fine.