Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

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

accept rate: 14%

Probably not, because TCP provides packet recovery:

permanent link

answered 13 Feb '12, 15:00

Breck%20Carter's gravatar image

Breck Carter
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
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



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "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:


question asked: 13 Feb '12, 13:06

question was seen: 2,435 times

last updated: 14 Feb '12, 18:22