No problem -- I should have realized that you were talking about command-line Vault. The documentation for these blocks looks so similar that I didn't even notice. Funny thing is that the Vault plugin does not complain about the existence of the superfluous options, so I'm just leaving them (as it makes it easier to switch back to command-line Vault).
In your post, you stated that "when Vault logs in, it also refreshes the client-side tree cache". Are you saying the client cache is updated on simply a login? I ask because I am using Vault in CCNet with both
autoGetSource="false" and
applyLabel="false". So, is it still updating the local cache even in this case? If so, it seems as though there is opportunity for improvement with the Vault Plugin. Though the command-line Vault could not make any assumption about how it is being used, it seems to me as though the Vault plugin for CCNet can and should be written with the assumption that the same user is going to be logging in and checking for modifications all of the time.
In any event, I switched my projects back to using command-line Vault . . . and the problem got
much worse. Within about 10 minutes I started seeing projects in
Exception status and
SqlException: Timeout expired errors in the Vault server log. After switching back to the Vault plugin, things improved, though the initial "Checking Modifications" period went on for quite some time.
Looking deeper into the server logs, I found a repeated deadlock exception that popped up when all projects where making their "Checking Modifications" call (using the Vault plugin):
Code: Select all
----5/11/2009 1:54:32 PM cruisecontrol--rtgbuild1.ddcinternal.com(10.150.4.230)--SSL Disabled System.Data.SqlClient.SqlException: Transaction (Process ID 59) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.Read()
at VaultServiceSQL.VaultRepUtil.BuildTreeDelta(SqlDataReader dr, Int64 nBaseRevID, Int64 nTargetRevID, Hashtable htSharedItems)
at VaultServiceSQL.VaultSqlSCC.GetRepositoryTreeDelta(VaultSqlConn conn, Int32 nRepID, Hashtable htSharedItems, Int64 nBaseRevID, Int64 nTargetRevID, VaultRepositoryDelta& rep) at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlDataReader.HasMoreRows()
at System.Data.SqlClient.SqlDataReader.ReadInternal(Boolean setTimeout)
at System.Data.SqlClient.SqlDataReader.Read()
at VaultServiceSQL.VaultRepUtil.BuildTreeDelta(SqlDataReader dr, Int64 nBaseRevID, Int64 nTargetRevID, Hashtable htSharedItems)
at VaultServiceSQL.VaultSqlSCC.GetRepositoryTreeDelta(VaultSqlConn conn, Int32 nRepID, Hashtable htSharedItems, Int64 nBaseRevID, Int64 nTargetRevID, VaultRepositoryDelta& rep)
----5/11/2009 1:54:32 PM cruisecontrol--rtgbuild1.ddcinternal.com(10.150.4.230)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceSQL.VaultSqlConn.CloseConn()
at VaultServiceAPILib.VaultServiceAPI.GetRepositoryTreeDelta(VaultTreeManager tm, Boolean bAdminMode, Int32 nUserID, Int32 nRepID, Int64 nBaseTxID, VaultDateTime dtLastChange, Boolean bUseDBDeltaOnCacheMiss, VaultDateTime& dtLatestChange, Int64& nTargetTxID, VaultRepositoryDelta& rd, VaultIntDnld& dlOut)
at VaultService.VaultService.GetRepositoryStructure(Int32 nRepID, Int64 nBaseRevision, Int64 nTargetRevision, VaultDateTime dtLastClientSecurityCheck, VaultDateTime& dtLatestServerSecurityCheck, Int64& nReturnTargetRevision, VaultRepositoryDelta& rd, Boolean bUseDBDeltaOnCacheMiss)
at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
at System.Web.Services.Protocols.LogicalMethodInfo.Invoke(Object target, Object[] values)
at System.Web.Services.Protocols.WebServiceHandler.Invoke()
at System.Web.Services.Protocols.WebServiceHandler.CoreProcessRequest()
at System.Web.Services.Protocols.SyncSessionlessHandler.ProcessRequest(HttpContext context)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
at System.Web.HttpApplication.ApplicationStepManager.ResumeSteps(Exception error)
at System.Web.HttpApplication.System.Web.IHttpAsyncHandler.BeginProcessRequest(HttpContext context, AsyncCallback cb, Object extraData)
at System.Web.HttpRuntime.ProcessRequestInternal(HttpWorkerRequest wr)
at System.Web.HttpRuntime.ProcessRequestNoDemand(HttpWorkerRequest wr)
at System.Web.Hosting.ISAPIRuntime.ProcessRequest(IntPtr ecb, Int32 iWRType)
I know that in a previous post you stated that there are "some known issues with the same user logging in concurrently". Does the same problem hold true for checking for changes? Based upon the stack dump I'm looking at, I'd say it does.
I think that if I can simply stagger the "Checking Modifications" for my projects at startup and at all other times, most of my issues related to CCNet will be resolved. I'll have to look into that further to see what can be done. I am a .NET developer, though I have not seen any documentation or configuration option for doing this. And I'd hate to alter the CCNet code as it impedes future upgrade. My gut tells me that if this were really "easy", I would have been able to Google an answer. Instead, I've only seen others looking for a solution to the same problem, so it's probably not a simple fix. Also, as a side note, even updating the ccnet.config file causes all projects to reload and again start their "Checking Modifications" phase.
I'll do what I can from my end to work around the problems with Vault here. Whatever you can do from your end so that the plugin better supports CCNet would be greatly appreciated.
Thanks,
--Dave Novak