Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 552
  • Last Modified:

InterBase DeadLock

I am a delphi Programmer and using IBX
every time i use interbase over multi user i get error message "deadlock"
what should i do in my program to avoid this problem ?
0
osasoft
Asked:
osasoft
1 Solution
 
God_AresCommented:
it has somthing to do with transactions


t1    |t2
      | r(x)  
r(x)  |        
x=x+20|        
      | r(y)  
      | y=x+20
w(x)  |        
      | w(x)  
commit|
      |commit  

this are Bad transactions. t1 shoudn't read x until t2 has unlocked it.

you should learn more about this subject, search the internet, or take a course.

0
 
kretzschmarCommented:
yep, its a transaction problem,
normally caused by two session like

session1 starts a transaction
session2 starts a transaction

session1 modifies table a
session2 modifies table b

session1 wants to modify table b
session2 wants to modify table a
-->deadlock, each session waits for the other

well, there is no common solution,
it depends on your code,
maybe you never end a transaction?

meikl ;-)


0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now