Skip to content

[Console] Prevent concurrent duplicate start/cancel for Flink and Spark apps #4384

Description

@shangeyao

Problem

Application start/stop checks (isCanBeStart) and state updates (starting()) are not atomic. Rapid duplicate clicks can submit multiple start/cancel requests before startFutureMap/cancelFutureMap is populated.

Proposed solution

  • Use in-memory pendingStarts / pendingCancels guards per application id
  • Atomically transition DB state to STARTING/CANCELLING via conditional lambdaUpdate
  • Clean up pending flags in async completion callbacks and on submission failure

Scope

  • FlinkApplicationActionServiceImpl
  • SparkApplicationActionServiceImpl

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions