Skip to content

AbstractInvoker's destroyed field should be volatile for visibility #13060

@NingleXu

Description

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

Environment

  • Dubbo version: 3.2
  • Operating System version: win10
  • Java version: 1.8

Steps to reproduce this issue

在AbstractInvoker的子类中如(DubboInvoker、TripleInvoker)都调用了super.isDestroyed()判断是否destroyed。
image
image
但是destoryed字段并没有使用volatile修饰保证可见性,并发环境下可能出现重复执行的问题。
image

解决方案:加上volatile关键字修饰

Expected Behavior

Actual Behavior

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

Just put your stack trace here!

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