8 messages in com.perforce.perforce-user[p4] Post pre-submit triggers...
FromSent OnAttachments
Todd Short23 Dec 2002 21:20 
Paul Goffin24 Dec 2002 01:30 
Stephen Vance24 Dec 2002 03:57 
Todd Short24 Dec 2002 06:20 
Stephen Vance24 Dec 2002 11:02 
Todd Short24 Dec 2002 12:25 
Chuck Karish24 Dec 2002 20:55 
Yariv Sheizaf24 Dec 2002 23:42 
Subject:[p4] Post pre-submit triggers...
From:Chuck Karish (kar@well.com)
Date:12/24/2002 08:55:52 PM
List:com.perforce.perforce-user

At 02:02 PM 12/24/2002 -0500, Stephen Vance wrote:

More daunting are the performance questions. What is the status of the database
locks during this operation?

This is the big issue. In order to commit each change as an atomic transaction, Perforce locks the files in the change until all the modifications are entered into the depot. This blocks other actions that overlap in scope with the submit. To do otherwise would be to serve corrupt data.

Submit-time triggers would cause immediately-noticeable performance issues for all clients unless the semantics of 'p4 submit' were altered to allow triggers to run before the locks were set. This would worsen the race condition for the submitter by lengthening the window during which someone else's submit could cause rejection of the submit pending a merge.

This works under CVS because CVS makes no guarantees about data coherence, and so does not need as thorough a locking scheme as Perforce has.