You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@shardingsphere.apache.org by GitBox <gi...@apache.org> on 2022/06/02 03:32:15 UTC

[GitHub] [shardingsphere] natehuangting opened a new pull request, #18147: can set some parameters of narayana in server.yaml

natehuangting opened a new pull request, #18147:
URL: https://github.com/apache/shardingsphere/pull/18147

   Fixes #18143 
   
   Changes proposed in this pull request:
   - Add two parameters RecoveryEnvironmentBean.expiryScanInterval and RecoveryEnvironmentBean.periodicRecoveryPeriod in Narayana.
   - Allow users to customize some parameters of narayana in server.yaml, such as defaultTimeout, if not defined, use the default value.
   - Modify the default 'YES' in the naraya parameter to be true, and 'NO' to be false, consistent with yaml.
   


-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] jingshanglu commented on a diff in pull request #18147: can set some parameters of narayana in server.yaml

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on code in PR #18147:
URL: https://github.com/apache/shardingsphere/pull/18147#discussion_r889842199


##########
shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/config/NarayanaConfigurationFileGenerator.java:
##########
@@ -98,6 +100,17 @@ private NarayanaConfigEntry createEntry(final String key, final Collection<Strin
         return result;
     }
     
+    private String getRecoveryId(final Properties transactionProps, final InstanceContext instanceContext) {
+        if (transactionProps.containsKey("xaRecoveryNodes")) {

Review Comment:
   `getRecoveryId` This function is not used, we can delete it.



-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] jingshanglu commented on a diff in pull request #18147: can set some parameters of narayana in server.yaml

Posted by GitBox <gi...@apache.org>.
jingshanglu commented on code in PR #18147:
URL: https://github.com/apache/shardingsphere/pull/18147#discussion_r887615622


##########
shardingsphere-kernel/shardingsphere-transaction/shardingsphere-transaction-type/shardingsphere-transaction-xa/shardingsphere-transaction-xa-provider/shardingsphere-transaction-xa-narayana/src/main/java/org/apache/shardingsphere/transaction/xa/narayana/config/NarayanaConfigurationFileGenerator.java:
##########
@@ -98,6 +100,17 @@ private NarayanaConfigEntry createEntry(final String key, final Collection<Strin
         return result;
     }
     
+    private String getRecoveryId(final Properties transactionProps, final InstanceContext instanceContext) {
+        if (transactionProps.containsKey("xaRecoveryNodes")) {
+            Collection<?> xaRecoveryNodes = (Collection<?>) transactionProps.get("xaRecoveryNodes");
+            return Joiner.on(",").join(xaRecoveryNodes);
+        } else {
+            return instanceContext.getInstance().getXaRecoveryIds().isEmpty()
+                    ? instanceContext.getInstance().getInstanceDefinition().getInstanceId()
+                    : Joiner.on(",").join(instanceContext.getInstance().getXaRecoveryIds());
+        }
+    }
+    

Review Comment:
   `xaRecoveryNodes` and `nodeIdentifier` may not be configurable. These two configurations are unique to the proxy instance. In cluster mode, the configuration here is shared by all proxies. You can modify `xaRecoveryNodes` through `distsql`.



-- 
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@shardingsphere.apache.org

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


[GitHub] [shardingsphere] natehuangting closed pull request #18147: can set some parameters of narayana in server.yaml

Posted by GitBox <gi...@apache.org>.
natehuangting closed pull request #18147: can set some parameters of narayana in server.yaml
URL: https://github.com/apache/shardingsphere/pull/18147


-- 
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@shardingsphere.apache.org

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