Skip to content

contrib/registry/file: registry file was deleted when multiple services registered #3709

Open
@songjianzhong

Description

@songjianzhong

Go version

go 1.21

GoFrame version

v2.7.2

Can this bug be reproduced with the latest release?

Option Yes

What did you do?

多个服务共用一个目录注册时,file_discovery.go第97行执行gfile.Remove(filePath),会误删其他服务的注册文件,导致服务使用异常。

What did you see happen?

当多个服务共用一个目录注册时,file_discovery.go第97行执行gfile.Remove(filePath),会误删其他服务的注册文件,导致服务使用异常。

What did you expect to see?

file_discovery.go第97行不能执行gfile.Remove(filePath)。建议将_ = gfile.Remove(filePath)这行删除。

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugIt is confirmed a bug, but don't worry, we'll handle it.need more details

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions