Skip to content

Inconsistent State Possible During Router Mapping Update [INT-2347] #6327

Closed

Description

@spring-operator

Gary Russell opened INT-2347 and commented

AMMR (2.1); AMR (2.0).

In AM(M)R.setChannelMappings(), this.channelMappings is cleared and rebuilt in discrete, unprotected steps.

If a message arrives after the clear() and before the putAll() completes, it will be routed using an incomplete mapping table.

Suggest changing channelMappings to be volatile, and build a new one in setChannelMappings(), and atomically update the instance variable.

That way, a message will be routed using either the old or (complete) new mapping table.


Affects: 2.0.5, 2.1 RC2

Issue Links:

Backported to: 2.0.6

Activity

  1. spring-operator commented on Jan 3, 2012

    @spring-operator
    ContributorAuthor

    Gary Russell commented

    PRs Issued:

    #285 (2.1.0)

    #286 (2.0.x)

  2. spring-operator commented on Jan 3, 2012

    @spring-operator
    ContributorAuthor

    Mark Fisher commented

    merged PRs to 'master' (2.1) and 'maint' (2.0.6)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions