jerryshao commented on code in PR #11299: URL: https://github.com/apache/gravitino/pull/11299#discussion_r3331487234
########## design-docs/async-iceberg-rest-hard-deletion.md: ########## @@ -217,33 +218,57 @@ already terminal, so it is consistent with the ยง5.7 tombstone table. ```sql CREATE TABLE IF NOT EXISTS `iceberg_cleanup_job` ( - `id` BIGINT(20) UNSIGNED NOT NULL AUTO_INCREMENT, - `metalake_name` VARCHAR(128) NOT NULL, - `catalog_name` VARCHAR(128) NOT NULL, + `id` BIGINT(20) UNSIGNED NOT NULL, + `catalog_id` BIGINT(20) UNSIGNED NOT NULL COMMENT 'globally unique id of the owning catalog, stable across catalog rename', `namespace` VARCHAR(512) NOT NULL, `table_name` VARCHAR(256) NOT NULL, - `metadata_location` VARCHAR(1024) NOT NULL, + `metadata_location` MEDIUMTEXT NOT NULL, `file_io_impl` VARCHAR(256) NOT NULL, `file_io_props` MEDIUMTEXT NOT NULL COMMENT 'JSON', `state` VARCHAR(16) NOT NULL COMMENT 'PENDING|RUNNING|SUCCEEDED|FAILED', `attempts` INT(10) NOT NULL DEFAULT 0, - `last_error` VARCHAR(2048) NULL COMMENT 'truncated reason for the most recent failure; NULL until a job fails', - `heartbeat_at` BIGINT(20) NULL COMMENT 'last heartbeat from the worker; NULL when unclaimed', + `last_error` VARCHAR(2048) NULL COMMENT 'truncated reason for the most recent failure, NULL until a job fails', + `heartbeat_at` BIGINT(20) NOT NULL DEFAULT 0 COMMENT 'last heartbeat from the worker, 0 when not running', `created_by` VARCHAR(128) NOT NULL COMMENT 'principal that requested the drop (audit)', - `updated_at` BIGINT(20) NOT NULL COMMENT 'last state change; drives poll ordering and terminal-row pruning', + `updated_at` BIGINT(20) NOT NULL COMMENT 'last state change, drives poll ordering and old finished-job cleanup', PRIMARY KEY (`id`), KEY `idx_state_updated` (`state`, `updated_at`), - KEY `idx_object` (`catalog_name`, `namespace`, `table_name`, `state`) -) ENGINE=InnoDB; + KEY `idx_object` (`catalog_id`, `namespace`(255), `table_name`(128), `state`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin COMMENT 'async Iceberg table cleanup jobs'; Review Comment: Did you change here aligning with the SQL script? -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
