Uploaded image for project: 'CDAP'
  1. CDAP
  2. CDAP-13296

Program status has a race condition

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0.0
    • Component/s: None
    • Labels:
      None
    • Release Notes:
      Hide
      Fixed a bug that could cause the status of a running program to be falsely returned as stopped if the run happened to change state in the middle of calculating the program state. Also fixed a bug where the state for a suspended workflow was stopped instead of running.
      Show
      Fixed a bug that could cause the status of a running program to be falsely returned as stopped if the run happened to change state in the middle of calculating the program state. Also fixed a bug where the state for a suspended workflow was stopped instead of running.
    • Rank:
      1|i00bxr:

      Description

      When we lookup program status, we lookup program run records that are in the RUNNING state in one tx, then run records that are in the STARTING state in another tx. These should really be read in the same transaction. 

      In general, system APIs like Store, that wrap every method in a transaction, are vulnerable to these types of race conditions.

        Attachments

          Activity

            People

            • Assignee:
              ashau Albert Shau
              Reporter:
              ashau Albert Shau
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: