﻿<?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>Ayende Rahien commented on Challenge: Find the bug</title><description>As I said, we run into this error in QA.
  
Once I had the stack trace, and the error, it was really obvious what was wrong
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment38</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment38</guid><pubDate>Thu, 28 May 2009 00:28:55 GMT</pubDate></item><item><title>configurator commented on Challenge: Find the bug</title><description>Silly question: why is there a commit limit?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment37</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment37</guid><pubDate>Thu, 28 May 2009 00:07:53 GMT</pubDate></item><item><title>firefly commented on Challenge: Find the bug</title><description>Wow... gloubidou I am impress.
  
  
Oren, how did you uncover the bug? If the application throw an exception somewhere then it's probably not that hard to trace down the culprit. Did you catch it through stress testing?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment36</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment36</guid><pubDate>Wed, 27 May 2009 22:51:56 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>gloubidou,
  
TADA! You got it!
  
When you hit it exactly right, you may get a LOT of expired values.
  
Those expired values can be big enough to hit the commit limit, and cause an error!
  
So I _was_ stupid, I thought so! :-)
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment35</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment35</guid><pubDate>Wed, 27 May 2009 21:13:17 GMT</pubDate></item><item><title>gloubidou commented on Challenge: Find the bug</title><description>Commit size will become huge in this case... Since you say that it is about code that isn't there, all I am able to come with is fixing a maximum of expired values to be processed in the loop and process the remaining later. That's similar to ORA-01555 snapshot too old!
  
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment34</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment34</guid><pubDate>Wed, 27 May 2009 21:11:22 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Neal, 
  
No, that is not that.
  
And you don't need to understand anything about the API to see the problem. 
  
The problem is that until you see the problem, you don't know what it is.
  
I am actually encouraged that no one managed to find it.
  
It means that I am not that stupid
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment33</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment33</guid><pubDate>Wed, 27 May 2009 21:07:23 GMT</pubDate></item><item><title>Neal Blomfield commented on Challenge: Find the bug</title><description>You get the version but do not check it has expired?  
  
  
TBH I am guessing based on what I would expect to see rather than understanding the code / api that this is using but it seems like the most logical thing.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment32</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment32</guid><pubDate>Wed, 27 May 2009 20:47:13 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Everyone, 
  
Notice what I said, what is the code that IS NOT THERE?!
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment31</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment31</guid><pubDate>Wed, 27 May 2009 20:18:33 GMT</pubDate></item><item><title>Paulo K&amp;#246;ch commented on Challenge: Find the bug</title><description>Two Api.JetDelete calls?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment30</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment30</guid><pubDate>Wed, 27 May 2009 20:14:09 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Sander,
  
keys is the variable holding the table name, not a collection. It is instruction to delete the current row.
  
  
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment29</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment29</guid><pubDate>Wed, 27 May 2009 18:59:10 GMT</pubDate></item><item><title>Sander Rijken commented on Challenge: Find the bug</title><description>The call to Api.JetDelete should probably be called with session and key, not session and keyS (deleting everything)?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment28</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment28</guid><pubDate>Wed, 27 May 2009 18:33:34 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Michael,
  
Huh?
  
What timer? There isn't any external code involved that affect the bug in this function
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment27</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment27</guid><pubDate>Wed, 27 May 2009 17:05:06 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>That is a user defined value. In the system that we are talking abut, 24 hours
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment26</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment26</guid><pubDate>Wed, 27 May 2009 17:04:10 GMT</pubDate></item><item><title>Michael Morton commented on Challenge: Find the bug</title><description>You're calling the function on a fixed timer and it's being executed again, before the previous execution has finished.  Considering it results in a crash, it's probably stacking a good number of times.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment25</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment25</guid><pubDate>Wed, 27 May 2009 16:53:26 GMT</pubDate></item><item><title>Itamar commented on Challenge: Find the bug</title><description>How often do values expire?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment24</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment24</guid><pubDate>Wed, 27 May 2009 16:38:37 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>DuvallBuck,
  
No, that is not the behavior we have
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment23</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment23</guid><pubDate>Wed, 27 May 2009 15:24:00 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>gloubidou,
  
Tada, you are _very_ close. 
  
  
aaron,
  
No, you don't.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment22</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment22</guid><pubDate>Wed, 27 May 2009 15:22:09 GMT</pubDate></item><item><title>DuvallBuck commented on Challenge: Find the bug</title><description>If the Api.RetrieveColumnAsString gets the first one then the Api.TryMovePrevious would never go to the rest but stop when the first one is deleted.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment21</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment21</guid><pubDate>Wed, 27 May 2009 14:23:17 GMT</pubDate></item><item><title>aaron commented on Challenge: Find the bug</title><description>do we need to know the contract of the jet api to find the problem?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment20</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment20</guid><pubDate>Wed, 27 May 2009 13:23:12 GMT</pubDate></item><item><title>gloubidou commented on Challenge: Find the bug</title><description>I guess that you are trying to clean expired values (stuff we don't care about anymore).. thus having a big result set would pose a problem... am I right?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment19</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment19</guid><pubDate>Wed, 27 May 2009 12:58:37 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Gerke,
  
It is marking that for deletion in the end of the current transaction, TryMovePrevious is not the issue.
  
The loop will terminate at the expected time.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment18</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment18</guid><pubDate>Wed, 27 May 2009 12:42:59 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Stephen,
  
No stack overflow, no, and not an infinite loop, but you should concentrate on the loop
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment17</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment17</guid><pubDate>Wed, 27 May 2009 12:41:58 GMT</pubDate></item><item><title>Stephen commented on Challenge: Find the bug</title><description>Ah, true ;)
  
  
(btw ayende, having problems submitting comments from ie7/8- not sure if its just me, hitting submit doesn't do anything it just sits there).
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment16</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment16</guid><pubDate>Wed, 27 May 2009 12:25:50 GMT</pubDate></item><item><title>configurator commented on Challenge: Find the bug</title><description>Stephen, That would hang, not crash...
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment15</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment15</guid><pubDate>Wed, 27 May 2009 11:48:38 GMT</pubDate></item><item><title>Gerke commented on Challenge: Find the bug</title><description>What happens to the table cursor after Api.JetDelete()?
  
And does Api.JetDelete() immediately remove the table row or only mark it as deleted? 
  
  
Otherwise scenario could be:
  
- Api.JetDelete moves cursor forward
  
- Api.TryMovePrevious moves cursor backwards (to same row)
  
=&gt; infinite loop
  
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment14</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment14</guid><pubDate>Wed, 27 May 2009 11:17:35 GMT</pubDate></item><item><title>Stephen commented on Challenge: Find the bug</title><description>I take it the crash is a stack overflow from an infinite loop and that you are either missing a breaking condition or not doing something that would should effect the 'position'..
  
  
Basically no idea, is this something that will probably only make sense when illustrated and explained?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment13</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment13</guid><pubDate>Wed, 27 May 2009 11:01:15 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>meo,
  
No, that is not it. It works just fine.
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment12</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment12</guid><pubDate>Wed, 27 May 2009 10:52:38 GMT</pubDate></item><item><title>meo commented on Challenge: Find the bug</title><description>Maybe "v =&gt; Api.JetDelete(session, data)" can't be run thru delegate for some reason?
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment11</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment11</guid><pubDate>Wed, 27 May 2009 10:13:11 GMT</pubDate></item><item><title>Ayende Rahien commented on Challenge: Find the bug</title><description>Alexander,
  
No, that is not it
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment10</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment10</guid><pubDate>Wed, 27 May 2009 09:55:14 GMT</pubDate></item><item><title>Alexander commented on Challenge: Find the bug</title><description>maybe issue is related with closure of the session and data variables  here:  v=&gt;Api.JetDelete(session, data)
</description><link>http://ayende.com/4035/challenge-find-the-bug#comment9</link><guid>http://ayende.com/4035/challenge-find-the-bug#comment9</guid><pubDate>Wed, 27 May 2009 09:53:25 GMT</pubDate></item></channel></rss>