Skip to content

Late cluster cache swap after joining new cluster #67

@evdherberg

Description

@evdherberg

In #65 we observed that, at the moment the memberAdded(final MembershipEvent event) is received in the ClusterListener, the CacheFactory is still using the DefaultLocalCacheStrategy instead of the strategy from the plugin. This resulted in a silent ignore of the cluster task we introduced in that method. Because that's what the default cache strategy does with cluster tasks.

The problem was resolved in b454bff by introducing a short wait, until we observe the CacheFactory actually using the strategy provided by this plugin. In local testing, this always happened within the first 200ms of waiting.

Probably it is wise to check whether there are any other event handlers that rely on the cache being properly swapped already. Note that the joinedCluster() events are evoked from the memberAdded handler in the plugin, so those could possibly be vulnerable in this respect.

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