Search code examples
clearcaseatomicclearcase-remote-client

rcleartool Atomicity


Let's say I have a local view that gets periodically updated using rcleartool update from the central ClearCase server. This update task takes 20~30 seconds to complete.

When my local view is getting updated during this 20~30 sec timeframe, what happens if:
I checkout files that are going to be updated by rcleartool update ?

Here I can only think of 3 situations:

  • A. Update blocks, and thus checkout succeeds only after update finishes. Things are good.
  • B. Checkout happens before update, in which case either:
    • i) update will fail because files are checked out,
    • ii) update will succeed but put checked out files in hijacked mode, or
    • iii) Checked out files get updated successfully. No hijacks.
  • C. All sorts of race conditions happen and view explodes.

Which one would it be?

Also, what happens I do a checkin while update is running?


Solution

  • The simplest answer is: update should be on-demand, not automatic.

    But should you keep that periodic automatic update, you could end up with one of the errors or defects mentioned in this comprehensive CCRC list.
    Probably, you would have a "Version discordance detected for element when attempting a checkout:

    enter image description here
    enter image description here

    You have a details in this technote:

    enter image description here

    To solve it with CCRC7.1, you can refresh the file or the view, asking to repair said discordance.

    enter image description here