Skip to content

TagRouter中,无论Invoker是否被过滤,都会创建新的List对象 #6082

Description

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

Environment

  • Dubbo version: 2.7.3
  • Operating System version: Centos
  • Java version: 1.8

Steps to reproduce this issue

When every RPC comes, the code in TagRouter class will be executed to create a fully new List reference which will increase the memory usage.

private <T> List<Invoker<T>> filterInvoker(List<Invoker<T>> invokers, Predicate<Invoker<T>> predicate) {
    return invokers.stream().filter(predicate).collect(Collectors.toList());
}

Activity

  1. added this to the 2.7.8 milestone on May 7, 2020
  2. zjseu commented on May 11, 2020

    @zjseu
    ContributorAuthor

    PullRequest: #6083

  3. added a commit that references this issue on Jul 2, 2020
    173df9a
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

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions