lulianqi commented on code in PR #1: URL: https://github.com/apache/dubbo-net/pull/1#discussion_r4433055000
########## DubboService/TripleDubboActuatorSuite.cs: ########## @@ -0,0 +1,504 @@ +/* + * 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. + */ + +using DubboNet.Clients.DataModle; +using DubboNet.DubboService.DataModle; +using DubboNet.DubboService.Native; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; + +namespace DubboNet.DubboService +{ + /// <summary> + /// 通过 Dubbo 3.3 引入的 HTTP/JSON 兼容端点调用 Dubbo Triple Java 接口一元方法。 + /// EN: Invokes Dubbo Triple Java-interface unary methods through the HTTP/JSON + /// compatibility endpoint introduced by Dubbo 3.3. + /// </summary> + /// <remarks> + /// 第一期实现仅面向使用 <c>application/json</c> 的 Java 接口一元调用,不包含 + /// Protobuf IDL、流式调用和带帧的 gRPC 线协议。 + /// EN: This first implementation intentionally targets unary Java-interface calls + /// with <c>application/json</c>. Protobuf IDL, streaming and the framed gRPC + /// wire format are outside its scope. + /// </remarks> + public sealed class TripleDubboActuatorSuite : + IDubboActuatorSuite, + IDubboGenericInvocationActuator + { + private const string ServiceVersionHeader = "tri-service-version"; + private const string ServiceGroupHeader = "tri-service-group"; + private const string ServiceTimeoutHeader = "tri-service-timeout"; + + private static readonly HashSet<string> ReservedRequestHeaders = + new HashSet<string>(StringComparer.OrdinalIgnoreCase) + { + "host", + "content-length", + "content-type", + "grpc-timeout", + ServiceVersionHeader, + ServiceGroupHeader, + ServiceTimeoutHeader + }; + + private sealed class ServiceMetadata + { + public string Version { get; set; } + public string Group { get; set; } + public int? Timeout { get; set; } + } + + private readonly HttpClient _httpClient; + private readonly bool _ownsHttpClient; + private readonly int _requestTimeoutMilliseconds; + private readonly ConcurrentDictionary<string, ServiceMetadata> _services = + new ConcurrentDictionary<string, ServiceMetadata>(StringComparer.Ordinal); + private bool _disposed; + + /// <inheritdoc/> + public DubboActuatorProtocolType ProtocolType => DubboActuatorProtocolType.Triple; + + /// <inheritdoc/> + public string ServiceFuncSpit => "/"; + + /// <inheritdoc/> + public DubboActuatorSuiteStatus ActuatorSuiteStatusInfo { get; private set; } = + new DubboActuatorSuiteStatus(); + + /// <inheritdoc/> + public DateTime LastActivateTime { get; private set; } = DateTime.Now; + + /// <summary> + /// 获取默认的 Java 服务接口名。 + /// EN: Gets the default Java service interface name. + /// </summary> + public string DefaultServiceName { get; private set; } + + /// <summary> + /// 使用指定地址和端口创建 Triple HTTP/JSON 执行器。 + /// EN: Creates a Triple HTTP/JSON actuator from an address and port. + /// </summary> + /// <param name="address">Provider 地址。EN: Provider address.</param> + /// <param name="port">Provider 端口。EN: Provider port.</param> + /// <param name="dubboActuatorSuiteConf">执行器配置。EN: Actuator configuration.</param> + public TripleDubboActuatorSuite( + string address, + int port, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this( + CreateHttpClient(address, port, dubboActuatorSuiteConf), + dubboActuatorSuiteConf, + true) + { + } + + /// <summary> + /// 使用网络端点创建 Triple HTTP/JSON 执行器。 + /// EN: Creates a Triple HTTP/JSON actuator from a network endpoint. + /// </summary> + /// <param name="endPoint">Provider 网络端点。EN: Provider network endpoint.</param> + /// <param name="dubboActuatorSuiteConf">执行器配置。EN: Actuator configuration.</param> + public TripleDubboActuatorSuite( + IPEndPoint endPoint, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this( + endPoint?.Address.ToString() + ?? throw new ArgumentNullException(nameof(endPoint)), + endPoint.Port, + dubboActuatorSuiteConf) + { + } + + internal TripleDubboActuatorSuite( + HttpClient httpClient, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this(httpClient, dubboActuatorSuiteConf, false) + { + } + + private TripleDubboActuatorSuite( + HttpClient httpClient, + DubboActuatorSuiteConf dubboActuatorSuiteConf, + bool ownsHttpClient) + { + _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); + if (_httpClient.BaseAddress == null) + { + throw new ArgumentException( + "Triple HttpClient must define BaseAddress.", + nameof(httpClient)); + } + + DubboActuatorSuiteConf configuration = + dubboActuatorSuiteConf ?? new DubboActuatorSuiteConf(); + DefaultServiceName = configuration.DefaultServiceName; + _requestTimeoutMilliseconds = Math.Max(1, configuration.DubboRequestTimeout); + _ownsHttpClient = ownsHttpClient; + } + + internal void RegisterService(DubboServiceEndPointInfo endpoint) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (string.IsNullOrWhiteSpace(endpoint.Interface)) + { + return; + } + + _services[endpoint.Interface] = new ServiceMetadata + { + Version = endpoint.Version, + Group = endpoint.Group, + Timeout = endpoint.Timeout + }; + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(string endPoint) + { + return SendQuery(endPoint, string.Empty); + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(string endPoint, string req) + { + if (!string.IsNullOrWhiteSpace(DefaultServiceName) + && !string.IsNullOrWhiteSpace(endPoint) + && !endPoint.Contains("#") + && !endPoint.Contains("/") + && !endPoint.Contains(".")) + { + endPoint = $"{DefaultServiceName}.{endPoint}"; + } + + DubboInvocation invocation = NativeDubboCodec.ParseInvocation(endPoint, req); + return SendQuery(invocation); + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(DubboInvocation invocation) + { + return SendQuery(invocation, CancellationToken.None); + } + + /// <inheritdoc/> + public async Task<DubboRequestResult> SendQuery( + DubboInvocation invocation, + CancellationToken cancellationToken) + { + if (_disposed) + { + throw new ObjectDisposedException(nameof(TripleDubboActuatorSuite)); + } + + invocation.Validate(); + LastActivateTime = DateTime.Now; + Stopwatch stopwatch = Stopwatch.StartNew(); + DubboRequestResult result = new DubboRequestResult + { + ServiceElapsed = 0, + ServiceElapsedAvailable = false + }; + + _services.TryGetValue(invocation.Service, out ServiceMetadata metadata); + string version = FirstNonBlank(invocation.Version, metadata?.Version); + string group = FirstNonBlank(invocation.Group, metadata?.Group); + int timeoutMilliseconds = Math.Max( + 1, + metadata?.Timeout ?? _requestTimeoutMilliseconds); + + string requestPath = $"/{Uri.EscapeDataString(invocation.Service)}" + + $"/{Uri.EscapeDataString(invocation.Method)}"; + string requestBody = JsonSerializer.Serialize(invocation.Arguments); + + try + { + // ResponseHeadersRead ends HttpClient.Timeout at the headers. Keep a Review Comment: 已在 d0c8f3f 修复:公开工厂创建的 HttpClient.Timeout 设为 InfiniteTimeSpan,由每次调用的 linked CTS 唯一控制响应头和完整响应体的截止时间。保留原有 Provider URL timeout 优先规则(可长于或短于客户端默认值),没有改成 Min。新增真实公开工厂/本地 TCP HTTP 用例:默认 50 ms、Provider 5000 ms、响应延迟 250 ms,响应头/正文两种延迟均成功;默认/Provider 短截止时间均会及时失败。完整离线单测 388/388 通过。 ########## .github/workflows/build.yml: ########## @@ -0,0 +1,34 @@ +name: Build and test + +on: + push: + branches: [main, codex/import-dubbonet-history] Review Comment: 已在 6a9b023 从 build.yml 和 license.yml 的 push.branches 中移除个人导入分支,两者只保留 main push、指向 main 的 PR 和 workflow_dispatch。只读权限、固定 Action SHA、超时/并发限制均保留。今后不再为了 fork push 检查把个人分支名留在 ASF 工作流中;当前提交的实际检查状态见 PR checks。 ########## Clients/DubboServiceDriver.cs: ########## @@ -0,0 +1,419 @@ +/* + * 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. + */ + +using DubboNet.Clients.DataModle; +using DubboNet.Clients.Helper; +using DubboNet.Clients.LoadBalancing; +using DubboNet.DubboService; +using DubboNet.DubboService.DataModle; +using MyCommonHelper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using static DubboNet.Clients.DubboClient; + +namespace DubboNet.Clients +{ + /// <summary>管理单个服务的 Provider、共享连接及负载状态。EN: Manages providers, shared connections and load state for one service.</summary> + internal class DubboServiceDriver : IDisposable + { + internal class DubboServiceDriverConf + { + public int DubboActuatorSuiteMaxConnections { get; set; } = 20; + public int DubboActuatorSuiteAssistConnectionAliveTime { get; set; } = 60 * 5; + public int DubboActuatorSuiteMasterConnectionAliveTime { get; set; } = 60 * 20; + public int DubboRequestTimeout { get; set; } = 60 * 1000; + } + + private sealed class MethodProvider + { + internal readonly RequestLoadStatistics Statistics = new(); + internal long CurrentWeight; + internal volatile bool Retired; + } + + private sealed class MethodState + { + internal readonly Dictionary<DubboEndpointKey, MethodProvider> Providers = new(); + internal double LastUsed; + internal MethodProvider For(DubboServiceEndPointInfo endpoint) => For(DubboEndpointKey.From(endpoint)); + internal MethodProvider For(DubboEndpointKey endpoint) + { + if (!Providers.TryGetValue(endpoint, out var provider)) Providers.Add(endpoint, provider = new MethodProvider()); + return provider; + } + } + + private sealed class CandidateSet + { + internal readonly DubboServiceEndPointInfo[] Providers; + internal readonly long[] PrefixWeights; + internal readonly long TotalWeight; + internal DubboSuiteConsistentHash Hash; + internal Dictionary<IPEndPoint, DubboServiceEndPointInfo> HashProviders; + + internal CandidateSet(IEnumerable<DubboServiceEndPointInfo> providers) + { + Providers = providers.OrderBy(item => item.EndPoint.ToString(), StringComparer.Ordinal) + .ThenBy(item => item.Scheme, StringComparer.Ordinal) + .ThenBy(item => item.Version, StringComparer.Ordinal) + .ThenBy(item => item.Group, StringComparer.Ordinal).ToArray(); + PrefixWeights = new long[Providers.Length]; + for (int i = 0; i < Providers.Length; i++) PrefixWeights[i] = TotalWeight += Providers[i].Weight; + } + } + + private readonly object _sync = new(); + private readonly Dictionary<DubboEndpointKey, DubboServiceEndPointInfo> _endpoints = new(); + private readonly Dictionary<DubboEndpointKey, DubboActuatorSuiteEndPintInfo> _shared; + private readonly Dictionary<(int Protocol, string Version, string Group), CandidateSet> _candidates = new(); + private readonly Dictionary<string, MethodState> _methods = new(StringComparer.Ordinal); + private readonly DubboServiceDriverConf _configuration; + private readonly Func<double> _clock; + private readonly Func<long, long> _random; + private readonly Func<DubboServiceEndPointInfo, IDubboActuatorSuite> _factory; + private bool _disposed; + private long _lastActivateTicks; + + public string ServiceName { get; } + public DateTime LastActivateTime => new DateTime(System.Threading.Interlocked.Read(ref _lastActivateTicks)); + // Callers cannot enumerate a dictionary while a registry watcher mutates it. + public Dictionary<DubboEndpointKey, DubboServiceEndPointInfo> InnerActuatorSuites + { get { lock (_sync) return new Dictionary<DubboEndpointKey, DubboServiceEndPointInfo>(_endpoints); } } + internal int ProviderCount { get { lock (_sync) return _endpoints.Count; } } + + public DubboServiceDriver(string serviceName, List<DubboServiceEndPointInfo> dbEpList, + Dictionary<DubboEndpointKey, DubboActuatorSuiteEndPintInfo> dubboActuatorSuiteCollection, + DubboServiceDriverConf dubboServiceDriverConf = null, Func<double> clock = null, + Func<long, long> random = null, Func<DubboServiceEndPointInfo, IDubboActuatorSuite> factory = null) + { + ArgumentNullException.ThrowIfNull(dbEpList); + ArgumentNullException.ThrowIfNull(dubboActuatorSuiteCollection); + ServiceName = serviceName; + _shared = dubboActuatorSuiteCollection; + _configuration = dubboServiceDriverConf ?? new DubboServiceDriverConf(); + _clock = clock ?? RequestLoadStatistics.MonotonicMilliseconds; + _random = random ?? Random.Shared.NextInt64; + _factory = factory ?? CreateSuite; + _lastActivateTicks = DateTime.Now.Ticks; + try { UpdateActuatorSuiteEndPoints(dbEpList); } + catch { Dispose(); throw; } + } + + private IDubboActuatorSuite CreateSuite(DubboServiceEndPointInfo endpoint) + { + var options = new DubboActuatorSuiteConf + { + AssistConnectionAliveTime = _configuration.DubboActuatorSuiteAssistConnectionAliveTime, + MasterConnectionAliveTime = _configuration.DubboActuatorSuiteMasterConnectionAliveTime, + DubboRequestTimeout = _configuration.DubboRequestTimeout, + MaxConnections = _configuration.DubboActuatorSuiteMaxConnections + }; + if (string.Equals(endpoint.Scheme, "dubbo", StringComparison.OrdinalIgnoreCase)) + return new NativeDubboActuatorSuite(endpoint.EndPoint, options); + if (string.Equals(endpoint.Scheme, "tri", StringComparison.OrdinalIgnoreCase)) + return new TripleDubboActuatorSuite(endpoint.EndPoint, options); + return new TelnetDubboActuatorSuite(endpoint.EndPoint, options); + } + + private void RegisterMetadata(DubboServiceEndPointInfo endpoint) + { + if (string.IsNullOrWhiteSpace(endpoint.Interface)) endpoint.Interface = ServiceName; + if (endpoint.InnerDubboActuatorSuite is NativeDubboActuatorSuite native) native.RegisterService(endpoint); + else if (endpoint.InnerDubboActuatorSuite is TripleDubboActuatorSuite triple) triple.RegisterService(endpoint); + } + + public int UpdateActuatorSuiteEndPoints(List<DubboServiceEndPointInfo> dbEpList) + { + ArgumentNullException.ThrowIfNull(dbEpList); + if (dbEpList.Any(item => item?.EndPoint == null)) + throw new ArgumentException("Provider snapshots must contain non-null endpoints.", nameof(dbEpList)); + var retired = new List<IDubboActuatorSuite>(); + int changes = 0; + try + { + lock (_sync) + { + if (_disposed) return 0; + var latest = dbEpList.Where(item => item.Disabled != true).Select(item => item.RoutingSnapshot()).GroupBy(DubboEndpointKey.From) + .ToDictionary(group => group.Key, group => group.Last()); + // Invalidate before mutating, including when creating a new connection fails. + _candidates.Clear(); + foreach (DubboEndpointKey endpoint in _endpoints.Keys.Where(key => !latest.ContainsKey(key)).ToArray()) + { + _endpoints.Remove(endpoint); + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(endpoint, out var state)) + { + state.Retired = true; + if (state.Statistics.Active == 0) method.Providers.Remove(endpoint); + } + IDubboActuatorSuite unused = ReleaseReference(endpoint); + if (unused != null) retired.Add(unused); + changes++; + } + foreach (var pair in latest) + { + DubboServiceEndPointInfo endpoint = pair.Value; + if (_endpoints.TryGetValue(pair.Key, out var previous)) + { + endpoint.InnerDubboActuatorSuite = previous.InnerDubboActuatorSuite; + if (previous.Weight != endpoint.Weight) + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(pair.Key, out var state)) state.CurrentWeight = 0; + } + else + { + lock (_shared) + { + if (!_shared.TryGetValue(pair.Key, out var shared)) + { + var suite = _factory(endpoint) ?? throw new InvalidOperationException("The provider factory returned no actuator suite."); + shared = new DubboActuatorSuiteEndPintInfo { EndPoint = endpoint.EndPoint, ActuatorSuite = suite }; + _shared.Add(pair.Key, shared); + } + shared.ReferenceCount++; + endpoint.InnerDubboActuatorSuite = shared.ActuatorSuite; + } + } + RegisterMetadata(endpoint); + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(pair.Key, out var state)) state.Retired = false; + _endpoints[pair.Key] = endpoint; + changes++; + } + } + } + finally { DisposeRetired(retired); } + return changes; + } + + public IDubboActuatorSuite GetDubboActuatorSuite(LoadBalanceMode loadBalanceMode, string qurey = null, + DubboActuatorProtocolType? requiredProtocol = null) + { + lock (_sync) return Select(loadBalanceMode, qurey, requiredProtocol, null)?.InnerDubboActuatorSuite; + } + + internal LoadBalancedInvocation SelectAndReserve(LoadBalanceMode mode, string query, + DubboActuatorProtocolType? protocol, DubboInvocation invocation) + { + lock (_sync) + { + if (_disposed) return null; + MethodState method = Method(invocation); + DubboServiceEndPointInfo endpoint = Select(mode, query, protocol, invocation, method); + if (endpoint == null) return null; + DubboEndpointKey endpointKey = DubboEndpointKey.From(endpoint); + MethodProvider provider = method.For(endpointKey); + RequestLoadStatistics statistics = provider.Statistics; + lock (_shared) _shared[endpointKey].ReferenceCount++; + // Selection and active increment are indivisible to competing requests on this driver. + return new LoadBalancedInvocation(endpoint.InnerDubboActuatorSuite, statistics, _clock, + () => ReleaseInvocation(endpointKey, method, provider)); + } + } + + private DubboServiceEndPointInfo Select(LoadBalanceMode mode, string query, + DubboActuatorProtocolType? protocol, DubboInvocation invocation, MethodState method = null) + { + if ((uint)mode > (uint)LoadBalanceMode.P2CLoadBalance) throw new ArgumentOutOfRangeException(nameof(mode)); + System.Threading.Interlocked.Exchange(ref _lastActivateTicks, DateTime.Now.Ticks); + if (_disposed) return null; + string version = string.IsNullOrWhiteSpace(invocation?.Version) ? null : invocation.Version; + string group = string.IsNullOrWhiteSpace(invocation?.Group) ? null : invocation.Group; + var key = (protocol.HasValue ? (int)protocol.Value : -1, version, group); Review Comment: 已在 6a9b023 的 README 兼容性表明确记录此行为变化:显式非空 Version/Group 按大小写精确匹配,不再回退到其他 Provider 身份;未指定的字段不加约束,没有匹配节点即无可用 Provider。不放松既有正确路由逻辑;覆盖全部六种负载模式及候选缓存的身份过滤回归仍通过。 ########## DubboService/TripleDubboActuatorSuite.cs: ########## @@ -0,0 +1,504 @@ +/* + * 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. + */ + +using DubboNet.Clients.DataModle; +using DubboNet.DubboService.DataModle; +using DubboNet.DubboService.Native; +using System; +using System.Collections.Concurrent; +using System.Collections.Generic; +using System.Diagnostics; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Text; +using System.Text.Json; +using System.Threading; +using System.Threading.Tasks; + +namespace DubboNet.DubboService +{ + /// <summary> + /// 通过 Dubbo 3.3 引入的 HTTP/JSON 兼容端点调用 Dubbo Triple Java 接口一元方法。 + /// EN: Invokes Dubbo Triple Java-interface unary methods through the HTTP/JSON + /// compatibility endpoint introduced by Dubbo 3.3. + /// </summary> + /// <remarks> + /// 第一期实现仅面向使用 <c>application/json</c> 的 Java 接口一元调用,不包含 + /// Protobuf IDL、流式调用和带帧的 gRPC 线协议。 + /// EN: This first implementation intentionally targets unary Java-interface calls + /// with <c>application/json</c>. Protobuf IDL, streaming and the framed gRPC + /// wire format are outside its scope. + /// </remarks> + public sealed class TripleDubboActuatorSuite : + IDubboActuatorSuite, + IDubboGenericInvocationActuator + { + private const string ServiceVersionHeader = "tri-service-version"; + private const string ServiceGroupHeader = "tri-service-group"; + private const string ServiceTimeoutHeader = "tri-service-timeout"; + + private static readonly HashSet<string> ReservedRequestHeaders = + new HashSet<string>(StringComparer.OrdinalIgnoreCase) + { + "host", + "content-length", + "content-type", + "grpc-timeout", + ServiceVersionHeader, + ServiceGroupHeader, + ServiceTimeoutHeader + }; + + private sealed class ServiceMetadata + { + public string Version { get; set; } + public string Group { get; set; } + public int? Timeout { get; set; } + } + + private readonly HttpClient _httpClient; + private readonly bool _ownsHttpClient; + private readonly int _requestTimeoutMilliseconds; + private readonly ConcurrentDictionary<string, ServiceMetadata> _services = + new ConcurrentDictionary<string, ServiceMetadata>(StringComparer.Ordinal); + private bool _disposed; + + /// <inheritdoc/> + public DubboActuatorProtocolType ProtocolType => DubboActuatorProtocolType.Triple; + + /// <inheritdoc/> + public string ServiceFuncSpit => "/"; + + /// <inheritdoc/> + public DubboActuatorSuiteStatus ActuatorSuiteStatusInfo { get; private set; } = + new DubboActuatorSuiteStatus(); + + /// <inheritdoc/> + public DateTime LastActivateTime { get; private set; } = DateTime.Now; + + /// <summary> + /// 获取默认的 Java 服务接口名。 + /// EN: Gets the default Java service interface name. + /// </summary> + public string DefaultServiceName { get; private set; } + + /// <summary> + /// 使用指定地址和端口创建 Triple HTTP/JSON 执行器。 + /// EN: Creates a Triple HTTP/JSON actuator from an address and port. + /// </summary> + /// <param name="address">Provider 地址。EN: Provider address.</param> + /// <param name="port">Provider 端口。EN: Provider port.</param> + /// <param name="dubboActuatorSuiteConf">执行器配置。EN: Actuator configuration.</param> + public TripleDubboActuatorSuite( + string address, + int port, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this( + CreateHttpClient(address, port, dubboActuatorSuiteConf), + dubboActuatorSuiteConf, + true) + { + } + + /// <summary> + /// 使用网络端点创建 Triple HTTP/JSON 执行器。 + /// EN: Creates a Triple HTTP/JSON actuator from a network endpoint. + /// </summary> + /// <param name="endPoint">Provider 网络端点。EN: Provider network endpoint.</param> + /// <param name="dubboActuatorSuiteConf">执行器配置。EN: Actuator configuration.</param> + public TripleDubboActuatorSuite( + IPEndPoint endPoint, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this( + endPoint?.Address.ToString() + ?? throw new ArgumentNullException(nameof(endPoint)), + endPoint.Port, + dubboActuatorSuiteConf) + { + } + + internal TripleDubboActuatorSuite( + HttpClient httpClient, + DubboActuatorSuiteConf dubboActuatorSuiteConf = null) + : this(httpClient, dubboActuatorSuiteConf, false) + { + } + + private TripleDubboActuatorSuite( + HttpClient httpClient, + DubboActuatorSuiteConf dubboActuatorSuiteConf, + bool ownsHttpClient) + { + _httpClient = httpClient ?? throw new ArgumentNullException(nameof(httpClient)); + if (_httpClient.BaseAddress == null) + { + throw new ArgumentException( + "Triple HttpClient must define BaseAddress.", + nameof(httpClient)); + } + + DubboActuatorSuiteConf configuration = + dubboActuatorSuiteConf ?? new DubboActuatorSuiteConf(); + DefaultServiceName = configuration.DefaultServiceName; + _requestTimeoutMilliseconds = Math.Max(1, configuration.DubboRequestTimeout); + _ownsHttpClient = ownsHttpClient; + } + + internal void RegisterService(DubboServiceEndPointInfo endpoint) + { + if (endpoint == null) + { + throw new ArgumentNullException(nameof(endpoint)); + } + if (string.IsNullOrWhiteSpace(endpoint.Interface)) + { + return; + } + + _services[endpoint.Interface] = new ServiceMetadata + { + Version = endpoint.Version, + Group = endpoint.Group, + Timeout = endpoint.Timeout + }; + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(string endPoint) + { + return SendQuery(endPoint, string.Empty); + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(string endPoint, string req) + { + if (!string.IsNullOrWhiteSpace(DefaultServiceName) + && !string.IsNullOrWhiteSpace(endPoint) + && !endPoint.Contains("#") + && !endPoint.Contains("/") + && !endPoint.Contains(".")) + { + endPoint = $"{DefaultServiceName}.{endPoint}"; + } + + DubboInvocation invocation = NativeDubboCodec.ParseInvocation(endPoint, req); + return SendQuery(invocation); + } + + /// <inheritdoc/> + public Task<DubboRequestResult> SendQuery(DubboInvocation invocation) + { + return SendQuery(invocation, CancellationToken.None); + } + + /// <inheritdoc/> + public async Task<DubboRequestResult> SendQuery( + DubboInvocation invocation, + CancellationToken cancellationToken) + { + if (_disposed) + { + throw new ObjectDisposedException(nameof(TripleDubboActuatorSuite)); + } + + invocation.Validate(); + LastActivateTime = DateTime.Now; + Stopwatch stopwatch = Stopwatch.StartNew(); + DubboRequestResult result = new DubboRequestResult + { + ServiceElapsed = 0, + ServiceElapsedAvailable = false + }; + + _services.TryGetValue(invocation.Service, out ServiceMetadata metadata); + string version = FirstNonBlank(invocation.Version, metadata?.Version); + string group = FirstNonBlank(invocation.Group, metadata?.Group); + int timeoutMilliseconds = Math.Max( + 1, + metadata?.Timeout ?? _requestTimeoutMilliseconds); + + string requestPath = $"/{Uri.EscapeDataString(invocation.Service)}" + + $"/{Uri.EscapeDataString(invocation.Method)}"; + string requestBody = JsonSerializer.Serialize(invocation.Arguments); + + try + { + // ResponseHeadersRead ends HttpClient.Timeout at the headers. Keep a + // single deadline alive until the complete body has been consumed. + using var timeout = CancellationTokenSource.CreateLinkedTokenSource(cancellationToken); + timeout.CancelAfter(timeoutMilliseconds); + using HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, requestPath) + { + Version = HttpVersion.Version11, + VersionPolicy = HttpVersionPolicy.RequestVersionExact, + Content = new StringContent(requestBody, Encoding.UTF8, "application/json") + }; + + AddHeader(request, ServiceVersionHeader, version); + AddHeader(request, ServiceGroupHeader, group); + AddHeader(request, ServiceTimeoutHeader, timeoutMilliseconds.ToString()); + AddAttachments(request, invocation.Attachments); + + using HttpResponseMessage response = await _httpClient.SendAsync( + request, + HttpCompletionOption.ResponseHeadersRead, + timeout.Token).ConfigureAwait(false); + string responseBody = await response.Content + .ReadAsStringAsync(timeout.Token) + .ConfigureAwait(false); + + stopwatch.Stop(); + result.RequestElapsed = (int)stopwatch.ElapsedMilliseconds; + result.Result = responseBody; + result.RawResult = ParseResponseValue(responseBody); + result.ResponseAttachments = ReadResponseHeaders(response); + + if (!response.IsSuccessStatusCode) + { + result.UpdateQueryFailed(); + result.ErrorMeaasge = BuildHttpError(response, responseBody); + } + } + catch (Exception exception) Review Comment: 按评论中允许的“保留失败结果并明确文档”方案处理,见 d0c8f3f 和 6a9b023。Native 原本也将传输/取消异常返回为失败结果,故没有只改 Triple 为抛取消异常而引入跨协议不一致。Triple 现在基于实际令牌状态区分 canceled by caller 与 timed out after N ms,不用 elapsed 时间猜测;两者均已触发时优先归类调用方取消,独立的传输取消不误报超时。README/Triple 文档写明 Task 不变为 Canceled、WhenAll 不自动传播取消。新增预先取消、响应头/正文读取取消、两源同时取消等回归,388 项离线测试通过。 ########## DubboService/Native/DubboHessian2Reader.cs: ########## @@ -0,0 +1,549 @@ +/* + * 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. + */ + +using System; +using System.Buffers.Binary; +using System.Collections.Generic; +using System.IO; +using System.Text; + +namespace DubboNet.DubboService.Native +{ + /// <summary> + /// 将 Hessian2 值读取为动态 .NET 列表和字典,用于 CLR 返回类型未知的 Dubbo 泛化响应。 + /// <para>EN: Reads Hessian2 values into dynamic .NET lists and dictionaries for generic Dubbo responses whose CLR result type is unknown.</para> + /// </summary> + internal sealed class DubboHessian2Reader + { + // Also used when expanding references into JSON-compatible response values. + internal const int MaxNestingDepth = 64; Review Comment: 按建议的最低侵入方案处理:a5d1cbe 区分 Hessian2 wire nesting 与 response nesting after reference expansion 两类错误,6a9b023 在 README 写明两者独立限制为 64 层、浅 wire 也可能因引用展开成深链被拒绝。深度边界与浅 wire/深引用链回归均通过。未新增公开配置 API 或放宽安全限制;另加整响应节点/体积预算处理独立的共享 DAG 放大问题。 ########## Clients/DubboServiceDriver.cs: ########## @@ -0,0 +1,419 @@ +/* + * 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. + */ + +using DubboNet.Clients.DataModle; +using DubboNet.Clients.Helper; +using DubboNet.Clients.LoadBalancing; +using DubboNet.DubboService; +using DubboNet.DubboService.DataModle; +using MyCommonHelper; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Text; +using static DubboNet.Clients.DubboClient; + +namespace DubboNet.Clients +{ + /// <summary>管理单个服务的 Provider、共享连接及负载状态。EN: Manages providers, shared connections and load state for one service.</summary> + internal class DubboServiceDriver : IDisposable + { + internal class DubboServiceDriverConf + { + public int DubboActuatorSuiteMaxConnections { get; set; } = 20; + public int DubboActuatorSuiteAssistConnectionAliveTime { get; set; } = 60 * 5; + public int DubboActuatorSuiteMasterConnectionAliveTime { get; set; } = 60 * 20; + public int DubboRequestTimeout { get; set; } = 60 * 1000; + } + + private sealed class MethodProvider + { + internal readonly RequestLoadStatistics Statistics = new(); + internal long CurrentWeight; + internal volatile bool Retired; + } + + private sealed class MethodState + { + internal readonly Dictionary<DubboEndpointKey, MethodProvider> Providers = new(); + internal double LastUsed; + internal MethodProvider For(DubboServiceEndPointInfo endpoint) => For(DubboEndpointKey.From(endpoint)); + internal MethodProvider For(DubboEndpointKey endpoint) + { + if (!Providers.TryGetValue(endpoint, out var provider)) Providers.Add(endpoint, provider = new MethodProvider()); + return provider; + } + } + + private sealed class CandidateSet + { + internal readonly DubboServiceEndPointInfo[] Providers; + internal readonly long[] PrefixWeights; + internal readonly long TotalWeight; + internal DubboSuiteConsistentHash Hash; + internal Dictionary<IPEndPoint, DubboServiceEndPointInfo> HashProviders; + + internal CandidateSet(IEnumerable<DubboServiceEndPointInfo> providers) + { + Providers = providers.OrderBy(item => item.EndPoint.ToString(), StringComparer.Ordinal) + .ThenBy(item => item.Scheme, StringComparer.Ordinal) + .ThenBy(item => item.Version, StringComparer.Ordinal) + .ThenBy(item => item.Group, StringComparer.Ordinal).ToArray(); + PrefixWeights = new long[Providers.Length]; + for (int i = 0; i < Providers.Length; i++) PrefixWeights[i] = TotalWeight += Providers[i].Weight; + } + } + + private readonly object _sync = new(); + private readonly Dictionary<DubboEndpointKey, DubboServiceEndPointInfo> _endpoints = new(); + private readonly Dictionary<DubboEndpointKey, DubboActuatorSuiteEndPintInfo> _shared; + private readonly Dictionary<(int Protocol, string Version, string Group), CandidateSet> _candidates = new(); + private readonly Dictionary<string, MethodState> _methods = new(StringComparer.Ordinal); + private readonly DubboServiceDriverConf _configuration; + private readonly Func<double> _clock; + private readonly Func<long, long> _random; + private readonly Func<DubboServiceEndPointInfo, IDubboActuatorSuite> _factory; + private bool _disposed; + private long _lastActivateTicks; + + public string ServiceName { get; } + public DateTime LastActivateTime => new DateTime(System.Threading.Interlocked.Read(ref _lastActivateTicks)); + // Callers cannot enumerate a dictionary while a registry watcher mutates it. + public Dictionary<DubboEndpointKey, DubboServiceEndPointInfo> InnerActuatorSuites + { get { lock (_sync) return new Dictionary<DubboEndpointKey, DubboServiceEndPointInfo>(_endpoints); } } + internal int ProviderCount { get { lock (_sync) return _endpoints.Count; } } + + public DubboServiceDriver(string serviceName, List<DubboServiceEndPointInfo> dbEpList, + Dictionary<DubboEndpointKey, DubboActuatorSuiteEndPintInfo> dubboActuatorSuiteCollection, + DubboServiceDriverConf dubboServiceDriverConf = null, Func<double> clock = null, + Func<long, long> random = null, Func<DubboServiceEndPointInfo, IDubboActuatorSuite> factory = null) + { + ArgumentNullException.ThrowIfNull(dbEpList); + ArgumentNullException.ThrowIfNull(dubboActuatorSuiteCollection); + ServiceName = serviceName; + _shared = dubboActuatorSuiteCollection; + _configuration = dubboServiceDriverConf ?? new DubboServiceDriverConf(); + _clock = clock ?? RequestLoadStatistics.MonotonicMilliseconds; + _random = random ?? Random.Shared.NextInt64; + _factory = factory ?? CreateSuite; + _lastActivateTicks = DateTime.Now.Ticks; + try { UpdateActuatorSuiteEndPoints(dbEpList); } + catch { Dispose(); throw; } + } + + private IDubboActuatorSuite CreateSuite(DubboServiceEndPointInfo endpoint) + { + var options = new DubboActuatorSuiteConf + { + AssistConnectionAliveTime = _configuration.DubboActuatorSuiteAssistConnectionAliveTime, + MasterConnectionAliveTime = _configuration.DubboActuatorSuiteMasterConnectionAliveTime, + DubboRequestTimeout = _configuration.DubboRequestTimeout, + MaxConnections = _configuration.DubboActuatorSuiteMaxConnections + }; + if (string.Equals(endpoint.Scheme, "dubbo", StringComparison.OrdinalIgnoreCase)) + return new NativeDubboActuatorSuite(endpoint.EndPoint, options); + if (string.Equals(endpoint.Scheme, "tri", StringComparison.OrdinalIgnoreCase)) + return new TripleDubboActuatorSuite(endpoint.EndPoint, options); + return new TelnetDubboActuatorSuite(endpoint.EndPoint, options); + } + + private void RegisterMetadata(DubboServiceEndPointInfo endpoint) + { + if (string.IsNullOrWhiteSpace(endpoint.Interface)) endpoint.Interface = ServiceName; + if (endpoint.InnerDubboActuatorSuite is NativeDubboActuatorSuite native) native.RegisterService(endpoint); + else if (endpoint.InnerDubboActuatorSuite is TripleDubboActuatorSuite triple) triple.RegisterService(endpoint); + } + + public int UpdateActuatorSuiteEndPoints(List<DubboServiceEndPointInfo> dbEpList) + { + ArgumentNullException.ThrowIfNull(dbEpList); + if (dbEpList.Any(item => item?.EndPoint == null)) + throw new ArgumentException("Provider snapshots must contain non-null endpoints.", nameof(dbEpList)); + var retired = new List<IDubboActuatorSuite>(); + int changes = 0; + try + { + lock (_sync) + { + if (_disposed) return 0; + var latest = dbEpList.Where(item => item.Disabled != true).Select(item => item.RoutingSnapshot()).GroupBy(DubboEndpointKey.From) + .ToDictionary(group => group.Key, group => group.Last()); + // Invalidate before mutating, including when creating a new connection fails. + _candidates.Clear(); + foreach (DubboEndpointKey endpoint in _endpoints.Keys.Where(key => !latest.ContainsKey(key)).ToArray()) + { + _endpoints.Remove(endpoint); + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(endpoint, out var state)) + { + state.Retired = true; + if (state.Statistics.Active == 0) method.Providers.Remove(endpoint); + } + IDubboActuatorSuite unused = ReleaseReference(endpoint); + if (unused != null) retired.Add(unused); + changes++; + } + foreach (var pair in latest) + { + DubboServiceEndPointInfo endpoint = pair.Value; + if (_endpoints.TryGetValue(pair.Key, out var previous)) + { + endpoint.InnerDubboActuatorSuite = previous.InnerDubboActuatorSuite; + if (previous.Weight != endpoint.Weight) + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(pair.Key, out var state)) state.CurrentWeight = 0; + } + else + { + lock (_shared) + { + if (!_shared.TryGetValue(pair.Key, out var shared)) + { + var suite = _factory(endpoint) ?? throw new InvalidOperationException("The provider factory returned no actuator suite."); + shared = new DubboActuatorSuiteEndPintInfo { EndPoint = endpoint.EndPoint, ActuatorSuite = suite }; + _shared.Add(pair.Key, shared); + } + shared.ReferenceCount++; + endpoint.InnerDubboActuatorSuite = shared.ActuatorSuite; + } + } + RegisterMetadata(endpoint); + foreach (MethodState method in _methods.Values) + if (method.Providers.TryGetValue(pair.Key, out var state)) state.Retired = false; + _endpoints[pair.Key] = endpoint; + changes++; + } + } + } + finally { DisposeRetired(retired); } + return changes; + } + + public IDubboActuatorSuite GetDubboActuatorSuite(LoadBalanceMode loadBalanceMode, string qurey = null, + DubboActuatorProtocolType? requiredProtocol = null) + { + lock (_sync) return Select(loadBalanceMode, qurey, requiredProtocol, null)?.InnerDubboActuatorSuite; + } + + internal LoadBalancedInvocation SelectAndReserve(LoadBalanceMode mode, string query, + DubboActuatorProtocolType? protocol, DubboInvocation invocation) + { + lock (_sync) + { + if (_disposed) return null; + MethodState method = Method(invocation); + DubboServiceEndPointInfo endpoint = Select(mode, query, protocol, invocation, method); + if (endpoint == null) return null; + DubboEndpointKey endpointKey = DubboEndpointKey.From(endpoint); + MethodProvider provider = method.For(endpointKey); + RequestLoadStatistics statistics = provider.Statistics; + lock (_shared) _shared[endpointKey].ReferenceCount++; + // Selection and active increment are indivisible to competing requests on this driver. + return new LoadBalancedInvocation(endpoint.InnerDubboActuatorSuite, statistics, _clock, + () => ReleaseInvocation(endpointKey, method, provider)); + } + } + + private DubboServiceEndPointInfo Select(LoadBalanceMode mode, string query, + DubboActuatorProtocolType? protocol, DubboInvocation invocation, MethodState method = null) + { + if ((uint)mode > (uint)LoadBalanceMode.P2CLoadBalance) throw new ArgumentOutOfRangeException(nameof(mode)); + System.Threading.Interlocked.Exchange(ref _lastActivateTicks, DateTime.Now.Ticks); + if (_disposed) return null; + string version = string.IsNullOrWhiteSpace(invocation?.Version) ? null : invocation.Version; + string group = string.IsNullOrWhiteSpace(invocation?.Group) ? null : invocation.Group; + var key = (protocol.HasValue ? (int)protocol.Value : -1, version, group); + if (!_candidates.TryGetValue(key, out var set)) + { + set = new CandidateSet(_endpoints.Values.Where(item => item.Disabled != true && item.Weight > 0 + && (!protocol.HasValue || item.InnerDubboActuatorSuite.ProtocolType == protocol) + && (version == null || string.Equals(item.Version, version, StringComparison.Ordinal)) + && (group == null || string.Equals(item.Group, group, StringComparison.Ordinal)))); + if (_candidates.Count >= 1024) _candidates.Clear(); Review Comment: 已在 6a9b023 补充就地注释:protocol/version/group 组合部分由调用方控制,1024 是防止缓存无界增长的保护上限而非 Provider 数量限制;全清可保持实现简单,后续 miss 从当前 _endpoints 低成本重建 CandidateSet。未引入 LRU 或改变选择行为。 ########## Tests/Shared/TestEndpointOptions.cs: ########## @@ -0,0 +1,138 @@ +/* + * 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. + */ + +using System.Net; +using System.Net.Sockets; + +namespace DubboNet.Testing; + +// Shared only by the examples/tests; this is not part of the library's API. +internal sealed record TestEndpointOptions( + string RegistryAddress, + string ProviderHost, + bool PrintConfiguration, + bool ShowHelp) +{ + public const string Usage = """ + Options: + --host HOST Registry/provider host (default: localhost). + --registry ADDRESS ZooKeeper address or nacos:// address. + --provider-host HOST Override the direct provider host independently. + --nacos Use Nacos instead of ZooKeeper. + --print-config Print resolved configuration without network I/O. + --help Show this help without running requests. + The first positional argument remains a registry address or 'nacos'. + Environment: DUBBONET_TEST_HOST, DUBBONET_TEST_REGISTRY, + DUBBONET_TEST_PROVIDER_HOST. + """; + + public static TestEndpointOptions Parse( + string[] arguments, + Func<string, string?>? readEnvironment = null) + { + readEnvironment ??= Environment.GetEnvironmentVariable; + string? host = null, registry = null, provider = null; + bool nacos = false, print = false, help = false; + for (int index = 0; index < arguments.Length; index++) + { + string argument = arguments[index]; + switch (argument) + { + case "--host": host = Value(); break; + case "--registry": registry = Value(); break; + case "--provider-host": provider = Value(); break; + case "--nacos": nacos = true; break; + case "--print-config": print = true; break; + case "--help": case "-h": help = true; break; + default: + if (argument.StartsWith('-') || registry != null) + throw new ArgumentException($"Unexpected argument: {argument}"); + registry = argument; + break; + } + + string Value() + { + if (++index >= arguments.Length || string.IsNullOrWhiteSpace(arguments[index]) + || arguments[index].StartsWith("--", StringComparison.Ordinal)) + throw new ArgumentException($"{argument} requires a value."); + return arguments[index].Trim(); + } + } + + string? environmentHost = Read("DUBBONET_TEST_HOST"); + string effectiveHost = Host(host ?? environmentHost ?? "localhost"); + registry ??= host != null || nacos ? null : Read("DUBBONET_TEST_REGISTRY"); Review Comment: 已在 6a9b023 修复 --nacos 和旧 nacos 简写两个入口:显式 Nacos 环境 registry 地址被保留(包括非默认端口),与 ZooKeeper 地址冲突时明确抛 ArgumentException;显式 --registry 优先,--host 仍按原有约定覆盖环境地址。新增两个快捷入口的环境/命令行回归,并更新原先固化静默覆盖行为的断言及 README。离线单测 388/388 通过,默认配置仍是 localhost。 ########## .github/workflows/license.yml: ########## @@ -0,0 +1,30 @@ +name: License header check + +# Checks source headers only; passing does not establish SGA/ICLA filing or IP +# clearance. The project owner confirmed the contributed source authorship. +on: + push: + branches: [main, codex/import-dubbonet-history] Review Comment: 已在 6a9b023 与 build.yml 一起移除个人分支触发,保留 main push、PR/main 和手动执行。license.yml 顶部新增注释,说明不发机器人评论,缺失文件头的具体文件路径应到 Actions job log 查看;comment: never、空 token 和只读权限不变。本地 SkyWalking Eyes 0.9.0:79 valid / 0 invalid,包含全部 76 个 C# 源文件。 -- 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]
