The forum will be down for scheduled maintenance on Saturday, March 4 beginning at 10am EST. Actual downtime is unknown but may be several hours.

Would a database client using tcp/ip recognize if the packet transmitting the commit command to the server is lost?

asked 13 Feb '12, 13:06

Martin's gravatar image

Martin
8.6k114149237
accept rate: 14%


Probably not, because TCP provides packet recovery: http://en.wikipedia.org/wiki/Packet_loss#Packet_recovery

permanent link

answered 13 Feb '12, 15:00

Breck%20Carter's gravatar image

Breck Carter
26.8k422580826
accept rate: 20%

So, there is no hand-shake on database level?

(14 Feb '12, 02:57) Martin
Replies hidden

If commit is succesful than you get succesfull return code. If tcp connection is broken while you transmit packet with commit than you get connection error (tcp garanee it). But may be will be interesting for you distributed transaction/two phase commit technology?

(14 Feb '12, 03:53) AlexeyK77

I am wondering if a situation is possible there the client sends the commit but server never receives it and client waits indefinetly to receive the handshake.

(14 Feb '12, 04:48) Martin

The possible answers are wayyy beyond my network knowledge, but the effect of the LivenessTimeout would come into play here, methinks.

(14 Feb '12, 05:03) Volker Barth
Comment Text Removed

It won't recognize this particular failure, because TCP will provide packet recovery as Breck has mentioned. Assuming TCP isn't able to recover and resend the packet, the client libraries should return a communication error (-85):

Communication error

Other failures for a commit should also be surfaced as an error. Ultimately, if the call making a commit returns without an error code, the commit should succeed.

permanent link

answered 14 Feb '12, 18:22

Tyson%20Lewis's gravatar image

Tyson Lewis
2.2k1641
accept rate: 22%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×14
×9

question asked: 13 Feb '12, 13:06

question was seen: 890 times

last updated: 14 Feb '12, 18:22