NeverENG commented on code in PR #22:
URL: https://github.com/apache/dubbo-net/pull/22#discussion_r4464311872
##########
Clients/DubboClient.cs:
##########
@@ -1190,9 +1190,13 @@ await
_metadataManager.RefreshCachedServiceAsync(unavailableServiceName)
string nowServiceName = serviceName;
if(isFullPath)
{
- if (serviceName.StartsWith(DubboRootPath) &&
serviceName.EndsWith("/providers"))
+ if (serviceName.StartsWith(DubboRootPath)
Review Comment:
确认比较规则不一致。此 PR 仍承诺不改变路径匹配行为;切换到 Ordinal 对特定输入会产生实际行为差异,因此留到 #20
后续附独立回归测试处理。已在 PR 描述记录,不会悄悄将它当无风险的常量提取。
##########
Clients/RegistryClient/ZooKeeperRegistryPaths.cs:
##########
@@ -0,0 +1,31 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+namespace DubboNet.Clients.RegistryClient
+{
+ /// <summary>
+ /// ZooKeeper 注册节点的默认根路径与目录片段;不用于 Nacos 分组或服务名。
+ /// <para>EN: ZooKeeper registry root and node segments, not Nacos groups
or service names.</para>
+ /// </summary>
+ internal static class ZooKeeperRegistryPaths
+ {
+ internal const string DefaultRoot = "/dubbo";
Review Comment:
确认裸根与前缀语义不同。目前 DefaultRoot + "/" 只有一个直接使用点,暂不加第二个仅一次使用的
const,避免为了统一而增大常量粒度;后续若前缀跨调用点复用,再以明确名称提取。此轮按用户决定把注册类别也收进 #22,Nacos 冒号与 ZK
斜杠仍留各自实现。
--
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]