You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@linkis.apache.org by "ChengJie1053 (via GitHub)" <gi...@apache.org> on 2023/04/21 02:45:40 UTC

[GitHub] [linkis] ChengJie1053 opened a new pull request, #4477: Updatethe volatile key for singleton

ChengJie1053 opened a new pull request, #4477:
URL: https://github.com/apache/linkis/pull/4477

   Updatethe volatile key for singleton
   


-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] jackxu2011 commented on a diff in pull request #4477: Updatethe volatile key for singleton

Posted by "jackxu2011 (via GitHub)" <gi...@apache.org>.
jackxu2011 commented on code in PR #4477:
URL: https://github.com/apache/linkis/pull/4477#discussion_r1173309237


##########
linkis-engineconn-plugins/openlookeng/src/main/java/org/apache/linkis/engineplugin/openlookeng/OpenLooKengECPlugin.java:
##########
@@ -34,8 +34,8 @@
 
 public class OpenLooKengECPlugin implements EngineConnPlugin {
 
-  private final Object resourceLocker = new Object();
-  private final Object engineFactoryLocker = new Object();
+  private volatile Object resourceLocker = new Object();
+  private volatile Object engineFactoryLocker = new Object();
 
   private EngineResourceFactory engineResourceFactory;
   private EngineConnFactory engineFactory;

Review Comment:
   the `volatile` key world is for the EngineResourceFactory and EngineConnFactory not the lock object.



-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] ChengJie1053 commented on a diff in pull request #4477: Updatethe volatile key for singleton

Posted by "ChengJie1053 (via GitHub)" <gi...@apache.org>.
ChengJie1053 commented on code in PR #4477:
URL: https://github.com/apache/linkis/pull/4477#discussion_r1173371729


##########
linkis-engineconn-plugins/openlookeng/src/main/java/org/apache/linkis/engineplugin/openlookeng/OpenLooKengECPlugin.java:
##########
@@ -34,8 +34,8 @@
 
 public class OpenLooKengECPlugin implements EngineConnPlugin {
 
-  private final Object resourceLocker = new Object();
-  private final Object engineFactoryLocker = new Object();
+  private volatile Object resourceLocker = new Object();
+  private volatile Object engineFactoryLocker = new Object();
 
   private EngineResourceFactory engineResourceFactory;
   private EngineConnFactory engineFactory;

Review Comment:
   ok,I change the code



-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org


[GitHub] [linkis] jackxu2011 merged pull request #4477: Updatethe volatile key for singleton

Posted by "jackxu2011 (via GitHub)" <gi...@apache.org>.
jackxu2011 merged PR #4477:
URL: https://github.com/apache/linkis/pull/4477


-- 
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: notifications-unsubscribe@linkis.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@linkis.apache.org
For additional commands, e-mail: notifications-help@linkis.apache.org