Users overwriting each others structures.

If you are having a problem using Vault, post a message here.

Moderator: SourceGear

Post Reply
Jim
Posts: 33
Joined: Mon Feb 16, 2004 9:59 am

Users overwriting each others structures.

Post by Jim » Tue Jul 20, 2010 3:11 am

Hi,

We have had several issues recently related to a particular folder structure. Essentially user A has created a folder structure. User B has not seen the folder structure on their client (despite being checked in).

User B has then created the same folder structure and checked it in.

The documents and structure from User A are then no longer visible to User A, and the structure has been replaced by that of user B. (User A's contents and doucments are no longer visible to either B or A).

I'm still trying to track down what exactly is going on here but it seems very odd and I don't understand how one user can overwrite another users changes at a folder level. Any assistance or clues where to look would be greatly appreciated.

Edit : I can not see anything in the history which supports the users saying that the folders have been overwritten, the closest I can find is that there are some errors and things like clients being out of date, which we have so far resolved by deleting all of the local cache files.

Thanks
Jim

Vault Version Info:
[20/07/2010 09:08:46] Version Check: This Vault client is version 4.1.4.18402
[20/07/2010 09:08:46] Version Check: Your Vault server is version 4.1.4.18402
Last edited by Jim on Tue Jul 20, 2010 5:55 am, edited 1 time in total.

Jim
Posts: 33
Joined: Mon Feb 16, 2004 9:59 am

Re: Users overwriting each others structures.

Post by Jim » Tue Jul 20, 2010 5:53 am

Ok currently I believe that the situation is that the users are attempting to rename a folder, but the rename is failing. This failure is leaving the client of one user in the end state but has not committed the operation to the vault server.

That I can understand, however the fault which is causing the rename not to work is a Primary Key Violation exception which I don't understand. Vault log extract here:



----20/07/2010 11:57:43 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__#17D33937__18C75D70'. Cannot insert duplicate key in object 'dbo.@tblfsobjectshares'.
The statement has been terminated.
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.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at VaultServiceSQL.VaultSqlSCC.GetItemsForPathChange(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nOwnerFolderObjID, String strXml, String strXmlShares, VaultCloakedFolder[]& vcf, VaultFolderRightsItem[]& vfri, VaultShareHint[]& vsh) 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.ConsumeMetaData()
at System.Data.SqlClient.SqlDataReader.get_MetaData()
at System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString)
at System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, DbAsyncResult result)
at System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method)
at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior)
at VaultServiceSQL.VaultSqlSCC.GetItemsForPathChange(VaultSqlConn conn, Int32 nRepID, Int64 nObjID, Int64 nOwnerFolderObjID, String strXml, String strXmlShares, VaultCloakedFolder[]& vcf, VaultFolderRightsItem[]& vfri, VaultShareHint[]& vsh)
----20/07/2010 11:57:43 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled DB: GetItemsForPathChange finished.
----20/07/2010 11:57:43 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled EndTx: Finished Applying Rename to $/NewWorldDocumentation/System Release 201009 R4
----20/07/2010 11:57:43 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled EndTx(): Failed commit changes for TxID 220545
----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled Rolling Back a transaction at VaultServiceSQL.VaultSqlConn.RollbackTransaction()
at VaultServiceAPILib.VaultServiceAPI.EndTx(Int32 nTxUserID, String strTxID, Int32 nTxAction, VaultIntTx vit, VaultDateTime& dtTxBegin, Int64& nNewRevision, VaultResponseItem[]& responses, VaultRepository& repNew)
at VaultService.VaultService.EndTx(String strTxID, Int32 nTxAction, VaultDateTime& dtTxBegin, Int64& nNewRevision, VaultResponseItem[]& responses)
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)

----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled SQL transaction 51790566 successfully rolled back.
----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled Beginning SQL transaction 4242785
----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled DB: DeletePendingTransactionObjects started.
----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled DB: DeletePendingTransactionObjects finished.
----20/07/2010 11:57:44 LesleyWhittle--lap3090859.rtdom.com(10.66.97.53)--SSL Disabled SQL transaction 4242785 successfully committed.

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Users overwriting each others structures.

Post by lbauer » Tue Jul 20, 2010 12:17 pm

User B has then created the same folder structure and checked it in.
It could be that the folder has already been renamed, but other users can't see it because their client-side cache is out of sync with the database. Other users may have uncommitted transactions sitting in the Pending Change Set, and are seeing a view of the tree that hasn't been checked in yet.

Here's info on resetting the cache.

http://support.sourcegear.com/viewtopic ... 13&t=11513

If, after the cache and pending change sets have been cleared, let us know if there are still problems.
Linda Bauer
SourceGear
Technical Support Manager

Jim
Posts: 33
Joined: Mon Feb 16, 2004 9:59 am

Re: Users overwriting each others structures.

Post by Jim » Wed Jul 21, 2010 4:04 am

Hi

I have attempted the rename on a separate machine after clearing down all of the local cache files. The error is still there -

JimMcGregor--wks3178158.appdevrtdom.com(10.66.97.88)--SSL Disabled System.Data.SqlClient.SqlException: Violation of PRIMARY KEY constraint 'PK__#783FB9EB__7933DE24'. Cannot insert duplicate key in object 'dbo.@tblfsobjectshares'.

Can we find out what it is that is causing the duplicate?

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Users overwriting each others structures.

Post by lbauer » Wed Jul 21, 2010 11:48 am

This could be a database issue involving shares.

We'd like to see a copy of the Vault Server log. It's called sgvault.log and is in %windir%\temp\sgvault on the server machine. Send the log zipped up to support at sourcegear.com, Attn: Linda. Please include a link to this forum post.
Linda Bauer
SourceGear
Technical Support Manager

Jim
Posts: 33
Joined: Mon Feb 16, 2004 9:59 am

Re: Users overwriting each others structures.

Post by Jim » Thu Jul 22, 2010 9:22 am

I've sent the full log through to your email, it should contain the same exception as listed in the second posting.

Thanks

lbauer
Posts: 9736
Joined: Tue Dec 16, 2003 1:25 pm
Location: SourceGear

Re: Users overwriting each others structures.

Post by lbauer » Wed Jul 28, 2010 9:13 am

This looks like a problem with shares. We're working on this offline.
Linda Bauer
SourceGear
Technical Support Manager

Post Reply