Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG]Service Name Mapping #11639

Closed
1 task done
mark4z opened this issue Feb 23, 2023 · 2 comments
Closed
1 task done

[BUG]Service Name Mapping #11639

mark4z opened this issue Feb 23, 2023 · 2 comments
Labels
type/bug Bugs to being fixed

Comments

@mark4z
Copy link
Member

mark4z commented Feb 23, 2023

  • I have searched the issues of this repository and believe that this is not a duplicate.

Environment

  • Dubbo version: 3.2
  • Operating System version: xxx
  • Java version: xxx

Steps to reproduce this issue

boolean contains = StringUtils.isContains(oldConfigContent, appName) has problem.
oldConfigContentis a list of service names. If strings.Contains(oldVal, appName), then the SNP registration will be skipped, e.g. if oldConfigContentis = dubbo.io-2 and appName= dubbo.io, then newServiceName will be skipped.

Pls. provide [GitHub address] to reproduce this issue.

Expected Behavior

Actual Behavior

    MetadataServiceNameMapping.java
    public boolean map(URL url) {
        boolean result = true;
        for (Map.Entry<String, MetadataReport> entry : metadataReportInstance.getMetadataReports(true).entrySet()) {
                do {
                    ConfigItem configItem = metadataReport.getConfigItem(serviceInterface, DEFAULT_MAPPING_GROUP);
                    String oldConfigContent = configItem.getContent();
                    if (StringUtils.isNotEmpty(oldConfigContent)) {
                        boolean contains = StringUtils.isContains(oldConfigContent, appName);
                        if (contains) {
                            // From the user's perspective, it means successful when the oldConfigContent has contained the current appName. So we should not throw an Exception to user, it will confuse the user.
                            succeeded = true;
                            break;
                        }
    }

If there is an exception, please attach the exception trace:

Just put your stack trace here!
@mark4z mark4z added the type/bug Bugs to being fixed label Feb 23, 2023
@mark4z
Copy link
Member Author

mark4z commented Feb 23, 2023

@AlbumenJ

@aamingaa
Copy link
Contributor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Bugs to being fixed
Projects
None yet
Development

No branches or pull requests

3 participants