File Read/Write Race Condition

Clovertech Forums Cloverleaf File Read/Write Race Condition

  • Creator
    Topic
  • #118132
    Don Martin
    Participant

      Hi folks,

      I have a message flow pattern where I will be using a fileset-local protocol thread to write a file at the end of a series of steps, and I am also using the same thread to read the file and kick off another series of steps.  My question is if there is potential for the input side of the thread to try to grab a file before the output side of the thread is done writing the file?

      Any and all responses welcome and appreciated.  Thanks.

      Don Martin, Sanford Health

    Viewing 0 reply threads
    • Author
      Replies
      • #118133
        Rob Abbott
        Keymaster

          Hi Don, if you use the “Temporary File” feature in the outbound fileset configuration, it will first write the data to the temporary file you name, and then move it to the “real” filename.  This should prevent the condition you describe above.

          I can’t remember what release we introduced this feature.  If you don’t have it in whatever version you’re running you’ll need to upgrade.

           

          Rob Abbott
          Cloverleaf Emeritus

      Viewing 0 reply threads
      • You must be logged in to reply to this topic.