Dear sirs.

We have switched from sqlite to FireBird embedded server, because FB
seems to support concurrent updates of the database, but we sometimes
have these exception coming from it:

2010-10-28 15:49:31,242 [56] ERROR
NetworkCatcher.Entities.Agent.Server.RunResultManager - Failed to send
result to server 32W2K3SP2VM-DEV.
NHibernate.Exceptions.GenericADOException: could not update:
[ExecutionEntry#89_19_32W2K3SP2VM-DEV][SQL: UPDATE Run SET ExecutionId
= ?, Source = ?, Destination = ?, ProtocolId = ?, Duration = ?,
SampleCount = ?, StartTime = ?, ServerHostName = ?,
SamplesSentToServer = ?, SampleInterval = ?, Parameters = ? WHERE Id
= ?] ---> FirebirdSql.Data.FirebirdClient.FbException: deadlock
update conflicts with concurrent update
concurrent transaction number is 31632 --->
FirebirdSql.Data.Common.IscException: deadlock
update conflicts with concurrent update
concurrent transaction number is 31632
   at
FirebirdSql.Data.Client.Native.FesDatabase.ParseStatusVector(IntPtr[]
statusVector)
   at FirebirdSql.Data.Client.Native.FesStatement.Execute()
   at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
behavior, Boolean returnsSet)
   at
FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteCommand(CommandBehavior
behavior)
   at FirebirdSql.Data.FirebirdClient.FbCommand.ExecuteNonQuery()
.
.
.

The FB response to this was
 “Why do you think it's a bug? It's a regular update conflict causing
by two transactions updating the same record simultaneously. What is
your transaction isolation mode?“

This phrase has puzzled me twice – once, because I was unpleasantly
surprised to discover that I may write the same record concurrently
and the second time – I have no idea what is my
transaction isolation mode and how do I use it to serialize writes to
the same record.

The mapping of the object, being updated is:

<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" auto-
import="true">
  <class name="NetworkCatcher.Entities.Agent.Server.ExecutionManager
+ExecutionEntry,NC.Entities.Agent.Server" lazy="false" table="Run"
         entity-name="ExecutionEntry">
    <id name="Id" column="Id" type="string" >
      <generator class="assigned"/>
    </id>
    <property name="ExecutionId"/>
    <property name="Source"/>
    <property name="Destination"/>
    <property name="ProtocolId" type="string"/>
    <property name="Duration"/>
    <property name="SampleCount"/>
    <property name="StartTime"/>
    <property name="ServerHostName"/>
    <property name="m_samplesSentToServer"
column="SamplesSentToServer" type="int" access="field" />
    <property name="SampleInterval"/>
    <property name="Parameters" type="binary"/>
  </class>
</hibernate-mapping>

I am sure there is a good samaritan out there, who knows the answer to
my problem. Please, please, please share from your wisdom...

Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"nhusers" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/nhusers?hl=en.

Reply via email to