Hello community. We have db with "read commited snapshot" set to ON. We run query:
While this transaction waiting, other transactions can read this data,
so if we run query, we'll immediately get the result.
But when we trying to use DO, we get lock on data. We run this code twice with 2-3 second difference.
We expected: selected: John Smith selected: John Smith stop waiting: John Smith stop waiting: John Smith But result is: selected: John Smith stop waiting: John Smith selected: John Smith stop waiting: John Smith Seems that first query locks Account with id=14 from reading by another transactions. This happens even we use "read uncommited" or set "read commited snapshot" to OFF. Where is our mistake? Thanks in advance. |
Hey, we've found the answer! Maybe, it could be found somewhere in specifications, but for now answer looks confusing for us. So, we tested code by doing requests with browser. We decided to try different browser. And we investigated, that Chrome, Opera and Firefox (newest stable versions) put our second request in queue, but IE9 - don't! Example (all browsers except IE): GET http://test/url1/ - send, then pending GET http://test/url1/ - wait FOR COMPLETION of first request, then send, and then pending IE: GET http://test/url1/ - send, then pending GET http://test/url1/ - send, then pending It means, that IE allows simultaneous requests per one url, but other browsers - no. Maybe it also differs request by method or query string, we didn't perform such test for now. And transactions don't affect this behaviour. Does anybody have any ideas? Why is this happening? |