Skip to content

[Bug]: A cached Telnet metadata failure survives provider replacement #53

Backlog

Description

@CarolDestiny

What happened?

When no metadata-center definition is available, a failed Telnet probe is cached at the service level. If discovery later returns a different provider that can supply metadata over Telnet, even a forced metadata refresh reuses the old failure in GetOrLoadTelnetMetadataAsync. Callers that depend on automatic Java-signature inference still can't resolve the method.

Expected: The changed provider set makes the old negative result inapplicable. The next refresh probes B and uses its method signature.

Actual: The last probed port is still 12341. The refresh reuses A's negative result and never tries B.

How can we reproduce it? (optional)

  1. Use an in-memory provider resolver for one service and an injected Telnet metadata loader. Return provider A (port 12341, release 2.7.2, so no metadata-center read is needed). Have A's probe return a failure.
  2. Request the service's method metadata once and confirm that A was probed and the lookup failed.
  3. Change discovery to provider B (port 12342) of the same service. Have the injected loader return a valid method signature for B. Call RefreshCachedServiceAsync and request the method metadata again.

Environment

The same test fails on b4b4500 and b9dce71 (apache/dubbo-net#48), with .NET 10 and with the netstandard2.0 library on .NET 8. The repro uses an injected probe; it doesn't need a live Telnet or metadata server. This is distinct from caching a failure when discovery finds no provider. Windows. The test uses an in-memory provider resolver and Telnet loader; no live registry or Telnet server is needed.

Suggested direction

Key the negative result by the relevant provider identity or invalidate it when that provider set changes. Keep the existing one-probe behavior while the provider set remains unchanged.

Relevant code on the baseline

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions