This thread looks to be a little on the old side and therefore may no longer be relevant. Please see if there is a newer thread on the subject and ensure you're using the most recent build of any software if your question regards a particular product.
This thread has been locked and is no longer accepting new posts, if you have a question regarding this topic please email us at support@mindscape.co.nz
|
We are inserting a number of records across different entities (e.g. User, UserRole, and User Subscriptions) in a single UoW and are wrapping the operations within a transaction. We are using Guids for our identity column and have noticed that prior to inserting a record in our user table (for example), Lightspeed runs a query similar to the following: SELECT Again this is OK, until we started to load test the application. Under heavy load, the above query results in deadlocks occuring on the User table. Can you suggest a way we can overcome this, e.g. given we are using Guids for Ids can we prevent the above query from being run, or is there a specific transactional pattern we should look to use with Lightspeed? Thanks, Mark |
|
|
You've got a uniqueness validation on the Username field. LightSpeed is performing the query as part of pre-save validation. Remove the validation and the query will not run. |
|
|
Thanks very much for your prompt reply. That's sorted it.
Cheers, Mark |
|