Skip to content

CacheMessageListner可能会将当前节点缓存删除 #8

Open
@bineanfrank

Description

@bineanfrank

虽然测试中出现的概率几乎为0,但是处理的逻辑确实有可能出现这种情况:
在代码逻辑中:

push(new CacheMessage(this.name, key))
caffeineCache.put(key, value)

push(new CacheMessage(this.name, key))在CacheMessageListener的回调方法中,并没有过滤掉当前节点,可能会导致当前节点的本地caffeine缓存也删除,当然,这个情况可以说几乎不存在(因为走网络和走内存几乎是走内存快),但是更加严谨的做法,应该是处理消息时,避开当前节点

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions