slfan1989 commented on code in PR #5673:
URL: https://github.com/apache/hadoop/pull/5673#discussion_r1210495371


##########
hadoop-yarn-project/hadoop-yarn/bin/FederationStateStore/MySQL/FederationStateStoreStoredProcs.sql:
##########
@@ -92,12 +92,9 @@ CREATE PROCEDURE sp_addApplicationHomeSubCluster(
    IN applicationContext_IN BLOB,
    OUT storedHomeSubCluster_OUT varchar(256), OUT rowCount_OUT int)
 BEGIN
-   INSERT INTO applicationsHomeSubCluster
-      (applicationId, homeSubCluster, createTime, applicationContext)
-      (SELECT applicationId_IN, homeSubCluster_IN, NOW(), applicationContext_IN
-       FROM applicationsHomeSubCluster
-       WHERE applicationId = applicationId_IN
-       HAVING COUNT(*) = 0 );
+   INSERT IGNORE INTO applicationsHomeSubCluster(

Review Comment:
   Thank you very much for your question! I will try to find a better way to 
handle this code to make it run more smoothly. In the process of submitting 
applications, we have added retry logic so that even if this part of the code 
fails, we will not miss application information. I will set up a complete Mysql 
test environment and submit a large number of apps in a multi-session situation 
to confirm the performance.
   



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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to