Skip to content

Filter Order was disrupted when user application extends the SPI of org.apache.dubbo.rpc.Filter #7757

@PromiseChan

Description

@PromiseChan

Environment

  • Dubbo version: 2.7.11
  • Operating System version: win10
  • Java version: oracle jdk 1.8.0_281

Steps to reproduce this issue

  1. Define the SPI extension point of org.apache.dubbo.rpc.Filter
    image

  2. write the filter and dubbo service
    (1)filter
    image
    (2)dubbo service
    image

  3. start the dubbo provider application
    image

Expected Result

ExecuteLimitFilter -> MonitorFilter
(the picture below is sorted Filters with only dubbo Native Filler)
image

Actual Result

MonitorFilter -> ExecuteLimitFilter
Causes the concurring count to be inaccurate !

image

What actually happens?
the Filters were sorted in the TreeMap , using ActivateComparator. When the order of Flter is not set, the traversal order will affect the sort results.
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    type/bugBugs to being fixed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions