fuweng11 commented on code in PR #8454:
URL: https://github.com/apache/inlong/pull/8454#discussion_r1255190002


##########
inlong-manager/manager-web/sql/changes-1.8.0.sql:
##########
@@ -118,3 +118,15 @@ ALTER TABLE `workflow_process`
     ADD `tenant` VARCHAR(256) DEFAULT 'public' NOT NULL comment 'Inlong tenant 
of workflow process' after `inlong_stream_id`;
 ALTER TABLE `workflow_task`
     ADD `tenant` VARCHAR(256) DEFAULT 'public' NOT NULL comment 'Inlong tenant 
of workflow task' after `display_name`;
+
+ALTER TABLE component_heartbeat DROP COLUMN id;
+ALTER TABLE `component_heartbeat` ADD PRIMARY KEY (`component`, `instance`);
+DROP INDEX unique_component_heartbeat on component_heartbeat;
+
+ALTER TABLE group_heartbeat DROP COLUMN id;
+ALTER TABLE `group_heartbeat` ADD PRIMARY KEY  (`component`, `instance`, 
`inlong_group_id`);
+DROP INDEX unique_group_heartbeat on group_heartbeat;
+
+ALTER TABLE stream_heartbeat DROP COLUMN id;
+ALTER TABLE `stream_heartbeat` ADD PRIMARY KEY (`component`, `instance`, 
`inlong_group_id`, `inlong_stream_id`);
+DROP INDEX unique_stream_heartbeat on stream_heartbeat;

Review Comment:
   Done



##########
inlong-manager/manager-dao/src/main/resources/mappers/ComponentHeartbeatEntityMapper.xml:
##########
@@ -49,17 +48,11 @@
         values (#{component,jdbcType=VARCHAR}, #{instance,jdbcType=VARCHAR},
                 #{statusHeartbeat,jdbcType=LONGVARCHAR}, 
#{metricHeartbeat,jdbcType=LONGVARCHAR},
                 #{reportTime,jdbcType=BIGINT})
-        ON DUPLICATE KEY UPDATE status_heartbeat = values(status_heartbeat),
-                                metric_heartbeat = values(metric_heartbeat),
-                                report_time      = values(report_time)
+            ON DUPLICATE KEY UPDATE status_heartbeat = 
values(status_heartbeat),
+            metric_heartbeat = values(metric_heartbeat),
+                                 report_time      = values(report_time)

Review Comment:
   Done



-- 
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]

Reply via email to