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 06:47:19 UTC

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

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