﻿<?xml version="1.0" encoding="utf-8"?><rss version="2.0"><channel><title>Ayende @ Rahien</title><link>http://ayende.com</link><description>Ayende @ Rahien</description><copyright>Copyright (C) Ayende Rahien  2004 - 2021 (c) 2026</copyright><ttl>60</ttl><item><title>Mike Brown commented on Your queries are going to fail in production</title><description>Something was striking me as odd about his assertions there, and even if you have the most stringent of testing, some environments (e.g. FDA regulated) still require you to place checks in your code to handle scenarios that "are never supposed to happen"
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment19</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment19</guid><pubDate>Tue, 01 Sep 2009 14:50:32 GMT</pubDate></item><item><title>Roman commented on Your queries are going to fail in production</title><description>The most common case of failing queries in production is IMHO a database update with feature change. This happens often especially with MySQL (even for minor version changes), but we've seen it with other DBMS too, e.g. PostgreSQL.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment18</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment18</guid><pubDate>Tue, 01 Sep 2009 13:37:18 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>Paul,
  
Yes, you have to. You can't just execute the same statements, there is logic that may be affected
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment17</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment17</guid><pubDate>Tue, 01 Sep 2009 11:55:37 GMT</pubDate></item><item><title>Paul Robson commented on Your queries are going to fail in production</title><description>Ayende, when you mention "replaying the transaction" above, do you mean throw away the session and restart the whole unit of work from the beginning?
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment16</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment16</guid><pubDate>Tue, 01 Sep 2009 11:50:41 GMT</pubDate></item><item><title>Dennis commented on Your queries are going to fail in production</title><description>I did remember me... Not quite sure why I am forgotten every second time I have something useful to say. Perhaps the timeout is too low?
  
Just checked, yes indeed just 1 month timeout on the cookie.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment15</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment15</guid><pubDate>Tue, 01 Sep 2009 09:14:34 GMT</pubDate></item><item><title>Dennis commented on Your queries are going to fail in production</title><description>No. They are a waste of time also...
  
Last time they spent weeks finding out why our failover setup was failing. Just to have us find out that they dont really support failover unless it is in a domain setup.
  
So in usual style, I implemented a workaround, which in this particular case actually ended up much cleaner.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment14</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment14</guid><pubDate>Tue, 01 Sep 2009 09:12:04 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>The remember me shouldn't be on a second time, you are already remember. IOW, it shouldn't forget you.
  
  
And I fully agree about the problematic nature of silent aborts.
  
Have you tried contacting PSS?
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment13</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment13</guid><pubDate>Tue, 01 Sep 2009 09:08:11 GMT</pubDate></item><item><title>Dennis commented on Your queries are going to fail in production</title><description>Yes and No... Since the transaction is stopped without your knowledge and no error handling is done, then all subsequent writes are still written.
  
Meaning that you cannot just assume that none of your work was completed, and can thus not repeat the transaction.
  
  
btw. The "Remember me?" keeps forgetting to remember itself, thus forgetting me the second time a post is made.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment12</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment12</guid><pubDate>Tue, 01 Sep 2009 09:04:37 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>Interesting, but while this is a bug, it doesn't relate to what I consider the most important thing about transactions: ACID
  
You don't have data corruption here, you have a transaction that mysteriously dies (and rollback).
  
As long as you can trust ACID, you can replay transactions
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment11</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment11</guid><pubDate>Tue, 01 Sep 2009 09:01:04 GMT</pubDate></item><item><title>Dennis commented on Your queries are going to fail in production</title><description>[connect.microsoft.com/.../ViewFeedback.aspx](https://connect.microsoft.com/SQLServer/feedback/ViewFeedback.aspx?FeedbackID=262291)  
I remember running into 1 more, but I dont think I reported that to M$ and the circumstances have now eluded me.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment10</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment10</guid><pubDate>Tue, 01 Sep 2009 08:50:46 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>Dennis,
  
Do you have a repro that shows that transaction handling is broken on SQL Server?
  
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment9</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment9</guid><pubDate>Tue, 01 Sep 2009 08:39:41 GMT</pubDate></item><item><title>Dennis commented on Your queries are going to fail in production</title><description>Would be nice to just be able to replay the transaction. But SQL server has so many bugs related to its transaction handling, that you never quite know when your transaction is broken.
  
And in usual style, they pretty much ignore whatever bug reports they get.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment8</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment8</guid><pubDate>Tue, 01 Sep 2009 08:37:32 GMT</pubDate></item><item><title>Alex Yakunin commented on Your queries are going to fail in production</title><description>Or simply a mistake, of course. I hardly believe Davy isn't aware about this.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment7</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment7</guid><pubDate>Tue, 01 Sep 2009 08:24:08 GMT</pubDate></item><item><title>Alex Yakunin commented on Your queries are going to fail in production</title><description>Fully agree. Failing query in production is normal. Deadlocks, version conflicts &amp; timeouts are typical cases. Their ignorance = lack of actual understanding of processes @ RDBMS.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment6</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment6</guid><pubDate>Tue, 01 Sep 2009 08:14:50 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>replaying the transaction
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment5</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment5</guid><pubDate>Mon, 31 Aug 2009 11:37:09 GMT</pubDate></item><item><title>Niraj commented on Your queries are going to fail in production</title><description>Ayende, can you elaborate on recovering aspects? Timeouts ???
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment4</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment4</guid><pubDate>Mon, 31 Aug 2009 11:35:17 GMT</pubDate></item><item><title>Steve Degosserie commented on Your queries are going to fail in production</title><description>All true. It also makes me think about the common assumption most developers have about Transaction Commits that generally don't fail. There are also a number of cases where this can happen (e.g. deferrable constraints in Oracle) but is usually not well handled.
  
  
Basically, to develop robust software, you must be paranoid :) (re-re-read M. Nygard's excellent Release It !).
  
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment3</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment3</guid><pubDate>Mon, 31 Aug 2009 11:06:35 GMT</pubDate></item><item><title>Ayende Rahien commented on Your queries are going to fail in production</title><description>Nima,
  
There aren't really ways of getting rid of deadlocks.
  
They are what happens when you have two transactions competing for the same resources.
  
  
In theory, you can try to restructure your queries so you will always access rows using the same path all the time, thus eliminating deadlocks.
  
In practice, it is not really possible to do something like that.
  
  
You can reduce deadlocks by specifying a lower transaction isolation level, but preventing them isn't likely in real world scenarios.
  
Luckily, recovering from them is very simple
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment2</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment2</guid><pubDate>Mon, 31 Aug 2009 09:09:11 GMT</pubDate></item><item><title>Nima commented on Your queries are going to fail in production</title><description>It might be irrelevant to your post but since you have mentioned deadlocks , I really like to know what's your advise (as a NHibernate professional) to prevent them ? As a matter of fact I've been working on a  projects for 4 years and we are using NHibernate. In rare cases we are getting deadlocks .we have tried to trace them in SQL server logs  but we haven't had any success to get rid of them.
</description><link>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment1</link><guid>http://ayende.com/4159/your-queries-are-going-to-fail-in-production#comment1</guid><pubDate>Mon, 31 Aug 2009 08:51:00 GMT</pubDate></item></channel></rss>