*bug report* ProcessorSlot的Spi中的isSingleton = false设置不生效
- Dominant language
- Java
- Stars
- 23.1k
- Forks
- 8.1k
- PR merge metrics
- No merged PRs in 30d
Description
## Issue Description
Type: *bug report*
### Describe what happened (or what feature you want)
当在非单例模式的ProcessorSlot(A)前加一个单例模式的ProcessorSlot(B)后,所有ProcessorSlotChain中B的next都会同步修改为最新创建的A
### Describe what you expected to happen
在上述行为后,不同的ProcessorSlotChain中B的next应该为各自新创建的A,而非共同的A
### How to reproduce it (as minimally and precisely as possible)
1. 添加一个ProcessSlot实现类,添加注解@Spi(order = Spi.ORDER_HIGHEST)
### Tell us your environment
sentinel 1.8.3
### Anything else we need to know?
DefaultProcessorSlotChain中添加next的方式是直接修改传入的AbstractLinkedProcessorSlot,但是传入的ProcessorSlot有可能是单例或非单例,倘若是单例,则在其后添加next会影响所有的ProcessorSlotChain
Contributor guide
Research direction
Start with DefaultProcessorSlotChain and AbstractLinkedProcessorSlot, then reproduce the issue using a custom ProcessorSlot annotated with @Spi(order = Spi.ORDER_HIGHEST) under Sentinel 1.8.3. Trace how next is added when the slot has isSingleton = false. Done means separate ProcessorSlotChain instances retain their own A after B, rather than sharing the latest A.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 52/100