Peer Knowledge Base

How does the Lock function behave when there is a disconnect between Agents and the PMC and broker?

Question

If one of the participants in a File Collaboration job has a network failure (the internet connection between an Agent and broker fails but the server still reachable locally), how does locking behave within the job and between the participants?

Answer

If a file was opened on Server A, it is locked on Server B (C, D, E,...). If Server B then loses connection to the broker, the file on Server B will remained locked since it has not received a release command yet. The file will remain locked until either the connection is re-established or the Peer Agent Service is restarted on that server.

The following example illustrates this process.

Test3.PNG

In this example, Server A is delab1srv3 and Server B is delab1srv4.

The Offline-Lock-Test.docx file was opened on delab1srv3 and thus was locked on all the other participants.  After that, connection between delab1srv4 and the broker was cut off and the file was closed on the source (delab1srv3) for this test. However the file remains locked on delab1srv4 but get released on all of the other participants.

Test2.PNG

This is because the Agent cannot be reached, so the release command cannot be send to the disconnected Agent.

Test7.png

Users can still work with the file on the connected participants (modify, rename, delete, or move), and PeerGFS will register each change.

Test5.PNG

Once changes are made, PeerGFS will try to contact delab1srv4 to push the changes through, but as it is not reachable, it will disconnect that Agent from the collaboration. Once the connection is re-established, the changes will be put through and the lock will be released. As shown below, a scan will be started to compare and match all watch sets again.

Test8.PNG


From PeerGFS v5.1 on, there is an enhanced method to change the behavior of a disconnected Agent. It will restart the Agent service on a disconnected server after a specified time to release all potential file locks. This functionality is not enabled by default.  Please contact Peer Software if you are interested in implementing this.

Page: Best Practices: Autodesk Inventor Page: Conflict Log Details Page: Connectivity issue during Agent update Page: Event Log Details Page: How does the Lock function behave when there is a disconnect between Agents and the PMC and broker? Page: HSTS blocks access to the PMC's web interface Page: Schedule upload of PMC and Agent logs to Peer Software Support Page: Upload PMC and Agent logs to Peer Software Support Page: Using the PortCheck utility to troubleshoot connectivity issues Page: What causes an Agent to disconnect? Page: What is a quorum and how did I lose it? Page: Why are ~pc*.tmp files appearing in folders monitored by PeerGFS?