Skip to content

changeWait race condition #4

@kmaehashi

Description

@kmaehashi

When a container (Jubatus server) become Wait status, it reports its status to ApplicationMaster. In changeWait method of ApplicationMaster, if status of all (currently two) containers become Wait, status of AM become Wait and reports the status to Jubatus-on-Yarn client.

However, as changeWait may be called asynchronously (from two Containers), there is a race condition around L99-L102 that AM status change be notified twice to Jubatus-on-Yarn client. The second status notification will fail, because state cannot be changed from Wait to Wait. As a consequence, 1 of Jubatus server container will occasionally go down.

We should make changeWait synchronized.

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