<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" media="screen" href="/~d/styles/atom10full.xsl"?><?xml-stylesheet type="text/css" media="screen" href="http://feeds.feedburner.com/~d/styles/itemcontent.css"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearch/1.1/" xmlns:blogger="http://schemas.google.com/blogger/2008" xmlns:georss="http://www.georss.org/georss" xmlns:gd="http://schemas.google.com/g/2005" xmlns:thr="http://purl.org/syndication/thread/1.0" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0" gd:etag="W/&quot;D08HRnczfSp7ImA9WhBbFU4.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230</id><updated>2013-05-14T07:50:37.985-05:00</updated><category term="Bonds" /><category term="SQL" /><category term="hotkey plus" /><category term="junit" /><category term="selenium" /><category term="mimetype" /><category term="ImageMagic" /><category term="htmleditor" /><category term="jar" /><category term="Insurance" /><category term="CTRL + BREAK" /><category term="job" /><category term="lsof" /><category term="similar columns" /><category term="counter offer" /><category term="grep" /><category term="performance" /><category term="sabeer bhatia" /><category term="Executors" /><category term="JRE 1.6.0_19" /><category term="Brother printer" /><category term="ExtJS" /><category term="newCachedThreadPool" /><category term="JAWR" /><category term="java" /><category term="compensation" /><category term="mysql" /><category term="Tuning. ThreadDump" /><category term="subeclipse" /><category term="MFC490CW" /><category term="BDB Replication" /><category term="CACHE_VERSION" /><category term="cloud" /><category term="thumbnail" /><category term="oracle" /><category term="Axis bank" /><category term="exec" /><category term="mod_ssl" /><category term="newFixedThreadPool" /><category term="echo" /><category term="interceptor" /><category term="sign" /><category term="optimization" /><category term="Time management" /><category term="TM contention" /><category term="bean" /><category term="Python" /><category term="Queue" /><category term="PIL" /><category term="whitespace" /><category term="proxy" /><category term="Aggregating" /><category term="Exchange" /><category term="dual" /><category term="AJAX" /><category term="slowness" /><category term="locator pattern" /><category term="Stock market" /><category term="Tiff" /><category term="Build" /><category term="Keyboard" /><category term="SmartClient" /><category term="Programmer" /><category term="opensource" /><category term="being lazy" /><category term="tuning" /><category term="DWR" /><category term="RabbitMQ" /><category term="job security" /><category term="AMQP" /><category term="Office 2007" /><category term="Java HttpServer" /><category term="Spring" /><category term="timestamp" /><category term="ThreadDump" /><category term="Quartz Admin" /><category term="purge" /><category term="similar constraints" /><category term="ant" /><category term="recession" /><category term="REST" /><category term="JSR311" /><category term="prank" /><category term="pattern matching" /><category term="paul graham" /><category term="JDK proxy" /><category term="tika" /><category term="expired certificate" /><category term="CGLib" /><category term="Silicon valley" /><category term="index" /><category term="IE" /><category term="windows7" /><category term="YSlow" /><category term="schema diff" /><category term="OutOfMemory" /><category term="Applet" /><category term="beginner" /><category term="CMYK" /><title>Programming fun at startup</title><subtitle type="html" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/posts/default" /><link rel="alternate" type="text/html" href="http://neopatel.blogspot.com/" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default?start-index=26&amp;max-results=25&amp;redirect=false&amp;v=2" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>202</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="self" type="application/atom+xml" href="http://feeds.feedburner.com/ProgrammingFunAtStartup" /><feedburner:info uri="programmingfunatstartup" /><atom10:link xmlns:atom10="http://www.w3.org/2005/Atom" rel="hub" href="http://pubsubhubbub.appspot.com/" /><entry gd:etag="W/&quot;D0AHQXw9eSp7ImA9WhBUEEo.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-3066859867078399039</id><published>2013-04-27T10:15:00.000-05:00</published><updated>2013-04-27T10:15:30.261-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-27T10:15:30.261-05:00</app:edited><title>This year's plants in my vegetable garden</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-OuKlK-58FoU/UXvmh_x5k_I/AAAAAAAACCA/7uxr7bKcER4/s1600/2013-04-26_18-05-11_627.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-OuKlK-58FoU/UXvmh_x5k_I/AAAAAAAACCA/7uxr7bKcER4/s320/2013-04-26_18-05-11_627.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;hybrid tea&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-tJix2EFcbqU/UXvmz8nj7uI/AAAAAAAACCI/4kzkmWt4qa8/s1600/2013-04-26_18-05-22_440.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-tJix2EFcbqU/UXvmz8nj7uI/AAAAAAAACCI/4kzkmWt4qa8/s320/2013-04-26_18-05-22_440.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-M8wZgv0E32s/UXvnmXRcxII/AAAAAAAACCQ/TK42iPD8wRc/s1600/2013-04-27_09-45-08_395.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://1.bp.blogspot.com/-M8wZgv0E32s/UXvnmXRcxII/AAAAAAAACCQ/TK42iPD8wRc/s320/2013-04-27_09-45-08_395.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-Vp41PHOBcs4/UXvqx5UFSqI/AAAAAAAACC0/QYdSdIFotBE/s1600/2013-04-27_09-47-05_362.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://4.bp.blogspot.com/-Vp41PHOBcs4/UXvqx5UFSqI/AAAAAAAACC0/QYdSdIFotBE/s320/2013-04-27_09-47-05_362.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;garden beans seedling&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-weM9pqL8hFg/UXvq2qPV5JI/AAAAAAAACC8/EtG4BZb3JIM/s1600/2013-04-27_09-47-09_120.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-weM9pqL8hFg/UXvq2qPV5JI/AAAAAAAACC8/EtG4BZb3JIM/s320/2013-04-27_09-47-09_120.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;tuver/pigeon pea seedling&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-kOrfBtpsJDk/UXvq6uB8K7I/AAAAAAAACDI/4QQ8QWexGek/s1600/2013-04-27_09-47-31_24.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-kOrfBtpsJDk/UXvq6uB8K7I/AAAAAAAACDI/4QQ8QWexGek/s320/2013-04-27_09-47-31_24.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;okra sedling&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-ZIAIp--TP5U/UXvq_mCGamI/AAAAAAAACDQ/PBwnX7AYNWU/s1600/2013-04-27_09-47-37_28.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-ZIAIp--TP5U/UXvq_mCGamI/AAAAAAAACDQ/PBwnX7AYNWU/s320/2013-04-27_09-47-37_28.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;cucumber seedling&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-NwNrPRe6NYo/UXvrDr8ztPI/AAAAAAAACDY/ESsYlcOqKQE/s1600/2013-04-27_09-48-08_64.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-NwNrPRe6NYo/UXvrDr8ztPI/AAAAAAAACDY/ESsYlcOqKQE/s320/2013-04-27_09-48-08_64.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;mint&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-3gurRlyRtcI/UXvnqwXwI0I/AAAAAAAACCY/M0lJ1Qz1ab8/s1600/2013-04-27_09-46-26_982.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-3gurRlyRtcI/UXvnqwXwI0I/AAAAAAAACCY/M0lJ1Qz1ab8/s320/2013-04-27_09-46-26_982.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;beet root&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-a_MvoSbnDOo/UXvolWne7SI/AAAAAAAACCg/M6CjBWU3MtI/s1600/2013-04-27_09-46-41_572.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://2.bp.blogspot.com/-a_MvoSbnDOo/UXvolWne7SI/AAAAAAAACCg/M6CjBWU3MtI/s320/2013-04-27_09-46-41_572.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
&amp;nbsp;basil&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-HfumJ40uypk/UXvqJ_EpE7I/AAAAAAAACCs/ohE841C0xBI/s1600/2013-04-27_09-46-54_145.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="320" src="http://3.bp.blogspot.com/-HfumJ40uypk/UXvqJ_EpE7I/AAAAAAAACCs/ohE841C0xBI/s320/2013-04-27_09-46-54_145.jpg" width="180" /&gt;&lt;/a&gt;&lt;/div&gt;
carrot/cilantro&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/S8R6pAxw_1Q" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/3066859867078399039/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/04/this-years-plants-in-my-vegetable-garden.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3066859867078399039?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3066859867078399039?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/S8R6pAxw_1Q/this-years-plants-in-my-vegetable-garden.html" title="This year's plants in my vegetable garden" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-OuKlK-58FoU/UXvmh_x5k_I/AAAAAAAACCA/7uxr7bKcER4/s72-c/2013-04-26_18-05-11_627.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/04/this-years-plants-in-my-vegetable-garden.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AASXk6fCp7ImA9WhBVGEg.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-3421082555201015485</id><published>2013-04-24T22:13:00.002-05:00</published><updated>2013-04-24T22:15:48.714-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-24T22:15:48.714-05:00</app:edited><title>toro 7.0hp lawn mower would start and dies within 20 sec</title><content type="html">This season after the first mowing on my second mowing my Toro 7.0 hp lawnmower&amp;nbsp; would start but dies quickly.&amp;nbsp; I first thought its a air filter issue so I cleaned it but then it again showed same symptoms.&amp;nbsp; Then I thought its a spark plug issue so I went to lowes and got a new spark plug and replaced it but again it wont start.&amp;nbsp; So I started googling.&lt;br /&gt;
&lt;br /&gt;
Turned it was due to the gas I was using,&amp;nbsp; I had some 4 months left over gas that I had used in first mowing and then I got new gas and on second mowing. So either it was due to old gas or the new gas was bad. Anyways googling tells me that its a carb issue and I need to open the carb bolt and carb cup and clean it.&amp;nbsp; In case you dont know where it is see the image.&amp;nbsp; This&amp;nbsp; bolt has a hole and if air filter is bad and grass clippings goes in this or dirt goes in here then that hole will be clogged.&amp;nbsp; Or if the gas has ethanol then I read that this hole can get clogged&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-uL8jLE_9U8s/UXieHLl0gfI/AAAAAAAACBw/lLipYelHRxE/s1600/2013-02-16_12-26-32_847.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="180" src="http://2.bp.blogspot.com/-uL8jLE_9U8s/UXieHLl0gfI/AAAAAAAACBw/lLipYelHRxE/s320/2013-02-16_12-26-32_847.jpg" width="320" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
So you need to pinch the fuel line or empty your fuel tank and then open the bolt to release the bowl, then you can clean the bowl and use the bread tie knot wire to clean the hole or use a needle to clean it.&lt;br /&gt;
&lt;br /&gt;
I plugged it back and problem solved.&lt;br /&gt;
&lt;br /&gt;
I got some fuel stabilizer and added to the remaining new gas but after fourth mowing I again ran into same issue so It must be because of the new gas.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/2TwD_4CGKlY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/3421082555201015485/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/04/toro-70hp-lawn-mower-would-start-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3421082555201015485?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3421082555201015485?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/2TwD_4CGKlY/toro-70hp-lawn-mower-would-start-and.html" title="toro 7.0hp lawn mower would start and dies within 20 sec" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-uL8jLE_9U8s/UXieHLl0gfI/AAAAAAAACBw/lLipYelHRxE/s72-c/2013-02-16_12-26-32_847.jpg" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/04/toro-70hp-lawn-mower-would-start-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0AERH49cSp7ImA9WhBVF0k.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-3895376425249371258</id><published>2013-04-23T15:41:00.000-05:00</published><updated>2013-04-23T15:41:45.069-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-23T15:41:45.069-05:00</app:edited><title>2000 unit tests mark</title><content type="html">This is a great progress. Six to eight months ago tests were there but not running on jenkins and after I added to jenkins the team has stood up and added more than 1500 unit tests. Thats a good sign because now I am not called on wekeend by Ops team to fix a regression bug.&lt;br /&gt;
&lt;br /&gt;
Still the code coverage is only 35% but we are making progress to improve it, when we started it was near 25% so this is a good progress. &lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/FuAp2RSl9Tw" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/3895376425249371258/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/04/2000-unit-tests-mark.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3895376425249371258?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3895376425249371258?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/FuAp2RSl9Tw/2000-unit-tests-mark.html" title="2000 unit tests mark" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/04/2000-unit-tests-mark.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CkQHQn04eyp7ImA9WhBVFko.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-8171405150751770840</id><published>2013-04-22T17:38:00.003-05:00</published><updated>2013-04-22T17:38:53.333-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-22T17:38:53.333-05:00</app:edited><title>Misconceptions of working from home</title><content type="html">&lt;ol&gt;
&lt;li&gt;People think "oh you work from home", 50% of think you are unemployed, wth.&lt;/li&gt;
&lt;li&gt;Many people think you slack&lt;/li&gt;
&lt;li&gt;Your family think you can take an hour off early just because you work from home.&lt;/li&gt;
&lt;li&gt;Family come with all sorts of requests and enters in your work area many times a day.&lt;/li&gt;
&lt;li&gt;Kids dont understand the concept of working from home and if they are at home instead of daycare then they can enter X no of times and want to work on your laptop. &lt;/li&gt;
&lt;/ol&gt;
&lt;br /&gt;
Still I enjoy working from home because I get long stretches of time to think and implement cool things for the startup. &lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/PVWbU6EnODQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/8171405150751770840/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/04/misconceptions-of-working-from-home.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8171405150751770840?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8171405150751770840?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/PVWbU6EnODQ/misconceptions-of-working-from-home.html" title="Misconceptions of working from home" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/04/misconceptions-of-working-from-home.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CU8FSXY9cCp7ImA9WhBVEUs.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-4495710320152847669</id><published>2013-04-16T20:56:00.001-05:00</published><updated>2013-04-16T20:56:58.868-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-04-16T20:56:58.868-05:00</app:edited><title>Mysql deadlock during delete query and index</title><content type="html">I had written a hierachical lock manager using mysql and once a thread finishes it was unlocking by deleting the locks.&amp;nbsp; The 20 thread perf test was fine but daily some 100-200 of deadlock exceptions would come randomly on some nodes. Now each thread is working in isolation so it doesnt makes sense to get deadlock, the query was like &lt;br /&gt;
&lt;br /&gt;
delete from hie_path_locks where customer_id=? and thread_id= ?&lt;br /&gt;
&lt;br /&gt;
Finally after some hit and try and troubleshooting I found that we had an index on customer_id only and when 10 thread on same workgroup would try to read locks to detect conflicts they would do&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
select * from hie_path_locks where customer_id=? and thread_id= ?&lt;br /&gt;
&lt;br /&gt;
apparently mysql default isolation of REPEATABLE_READ would take locks on even rows that are read, check http://www.mysqlperformanceblog.com/2012/08/28/differences-between-read-committed-and-repeatable-read-transaction-isolation-levels/&lt;br /&gt;
&lt;br /&gt;
Adding an index on customer_id,thread_id instead of just customer_id&amp;nbsp; solved the random deadlocks.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/U8IKBEgqjuY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/4495710320152847669/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/04/mysql-deadlock-during-delete-query-and.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4495710320152847669?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4495710320152847669?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/U8IKBEgqjuY/mysql-deadlock-during-delete-query-and.html" title="Mysql deadlock during delete query and index" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/04/mysql-deadlock-during-delete-query-and.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Ck4CQn0yfCp7ImA9WhBXFEk.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-5345899838487247445</id><published>2013-03-27T22:22:00.001-05:00</published><updated>2013-03-27T22:22:43.394-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-27T22:22:43.394-05:00</app:edited><title>Spring 3.2 quartz 2.1 Jobs added with no trigger must be durable.</title><content type="html">I am trying to enable HA on nodes and in that process I found that in a two test node setup a job that has a frequency of 10 sec was running into deadlock. So I tried upgrading from Quartz 1.8 to 2.1 by following the migration guide but I ran into an exception that says "Jobs added with no trigger must be durable.".&lt;br /&gt;
&lt;br /&gt;
After looking into spring and Quartz code I figured out that now Quartz is more strict and earlier the scheduler.addJob had a replace parameter which if passed to true would skip the durable check, in latest quartz this is fixed but spring hasnt caught up to this. So what do you do, well I jsut inherited the factory and set durability to true and use that&lt;br /&gt;
&lt;br /&gt;
public class DurableJobDetailFactoryBean extends JobDetailFactoryBean {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; public DurableJobDetailFactoryBean() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; setDurability(true);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;
&lt;br /&gt;
and used this instead of JobDetailFactoryBean in the spring bean definition&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="restoreJob" class="com.xxx.infrastructure.quartz.DurableJobDetailFactoryBean"&amp;gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/sIIkMEh-jnk" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/5345899838487247445/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/spring-32-quartz-21-jobs-added-with-no.html#comment-form" title="2 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/5345899838487247445?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/5345899838487247445?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/sIIkMEh-jnk/spring-32-quartz-21-jobs-added-with-no.html" title="Spring 3.2 quartz 2.1 Jobs added with no trigger must be durable." /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>2</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/spring-32-quartz-21-jobs-added-with-no.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4DQHw7eyp7ImA9WhBXEEw.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-2035491343881054295</id><published>2013-03-23T00:35:00.001-05:00</published><updated>2013-03-23T00:36:11.203-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-23T00:36:11.203-05:00</app:edited><title>graphite dynamic counters trending</title><content type="html">I generate this report daily using cron as to top exceptions across all datacentres and top queries across all datacentre and top urls across all datacentres and send them via email.&lt;br /&gt;
&lt;br /&gt;
Problem is that after every release the no goes up and down as due to some bug a new exception will popup or some exception will resurrect.&amp;nbsp; How do I trend and correlate these dynamic counters.&lt;br /&gt;
&lt;br /&gt;
Solution came from my colleague in just an informal chat and he recommended I should md5-hash the url and create a graphite counter for it and in the email&amp;nbsp; just make the count a hyperlink&amp;nbsp; like shown below.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-iHFg6WS3uFI/UU0-h0gQOkI/AAAAAAAACBY/oSRj4X0aVAk/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="203" src="http://1.bp.blogspot.com/-iHFg6WS3uFI/UU0-h0gQOkI/AAAAAAAACBY/oSRj4X0aVAk/s640/Screenshot.png" width="640" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;
&lt;br /&gt;
Now I can trend the query as clicking on this shows me a graph as shown below. My next plan is to inline the graph for top 10 urls in the email itself so I don't even need to click them.&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://3.bp.blogspot.com/-Uwrnz4SM3Js/UU0-yuNLpkI/AAAAAAAACBg/nC9ONzxwnDE/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="291" src="http://3.bp.blogspot.com/-Uwrnz4SM3Js/UU0-yuNLpkI/AAAAAAAACBg/nC9ONzxwnDE/s400/Screenshot-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/X7McLrIqclc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/2035491343881054295/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/graphite-dynamic-counters-trending.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/2035491343881054295?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/2035491343881054295?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/X7McLrIqclc/graphite-dynamic-counters-trending.html" title="graphite dynamic counters trending" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-iHFg6WS3uFI/UU0-h0gQOkI/AAAAAAAACBY/oSRj4X0aVAk/s72-c/Screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/graphite-dynamic-counters-trending.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DEMESHs6eip7ImA9WhBXEEw.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-8437135862148888292</id><published>2013-03-23T00:26:00.003-05:00</published><updated>2013-03-23T00:26:49.512-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-23T00:26:49.512-05:00</app:edited><title>Being Analytics driven vs firefight driven</title><content type="html">We have doubled our incoming traffic every 6 months and past 3 years have always been in firefighting mode where some customer reports an issue or a node goes down and we try to analyze the root cause and fix them.&lt;br /&gt;
&lt;br /&gt;
Lately I am trying to move away from working in a firefight driven mode to Analytics driven mode. What I meant is being proactive to monitor and understand the system by gathering various metrics and fixing issues before cusotmer notices them. For e.g. to put our nodes in HA mode I had to store a sessionId to userId mapping in database, the only real reason to do this was for our Flash file uploader because it makes a request but doesnt pass the sessionId in cookie but it passes as request parameter. This causes the request to go to a completely different node.&amp;nbsp; So to handle this we wrote a session listener that would save the sessionId to userId mapping in db.&amp;nbsp; The code went live and suddenly after some days the db went down. What happened was that the developer forgot to remove the row in session purge and the table had grown to 140M.&amp;nbsp; I didnt expected this table to be more than 1-2M at a time but due to code bug this issue occurred.&amp;nbsp; So first thing I did was to add a monitor on all tables in our transient db and it alerts me if any table has &amp;gt;10M rows. Immediately it caught another code bug where an audit table has grown to &amp;gt;70M for one customer so we caught it and fixed it in hotpatch it without causing another downtime. &lt;br /&gt;
&lt;br /&gt;
Another incident happened two weeks back when I travelled to Bay area and for two days a db went down exactly between 11:30 and 11:45 and restarted on its own.&amp;nbsp; What we found that again that session table was 20M even after adding the session destroy delete fix and a backend purge job from all nodes were trying to delete 18M records out of this 20M table.&amp;nbsp; What happened was that some code flows(webdav and FTP upload) that are not supposed to be session dependent were setting user in session.&amp;nbsp; Users uploaded 20M files using FTP/webdav and that caused this table to ballon. The only reason I was able to find the issue was because I log stats on each node as to what methods happened every 5 mins. So I grepped queries in those between 11:30 and 11:45 on all nodes.&lt;br /&gt;
&lt;br /&gt;
Immediately I realized that I need something more global, we have 40 mysql servers and I needed some report as to how many queries are happening on each node and in overall at DC level.&amp;nbsp; If I had this report then I woudl have caught the session thing before it became an issue.&amp;nbsp; Scribe comes to rescue, now I write those 5 min stats to scribe that gets aggregated in central scribe across all datacentres. I roll the log nightly and wrote a python cron to generate report that dumps queries and no of times they happened&amp;nbsp; and their avg time.&lt;br /&gt;
&lt;br /&gt;
Yesterday it went live in UAT and immediately I found 2-3 issues where top queries were not what we expected (caching bug :)). Lesson learnt is be analytics driven rather than hunch or firefight driven.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/eYqzqNgwwrA" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/8437135862148888292/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/being-analytics-driven-vs-firefight.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8437135862148888292?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8437135862148888292?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/eYqzqNgwwrA/being-analytics-driven-vs-firefight.html" title="Being Analytics driven vs firefight driven" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/being-analytics-driven-vs-firefight.html</feedburner:origLink></entry><entry gd:etag="W/&quot;Dk8BRnY7fyp7ImA9WhBXEEw.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-4273955741471003336</id><published>2013-03-23T00:00:00.002-05:00</published><updated>2013-03-23T00:00:57.807-05:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-23T00:00:57.807-05:00</app:edited><title>Haproxy and tomcat JSESSIONID</title><content type="html">One of the biggest problems I have been trying to solve at our startup is to put our tomcat nodes in HA mode. Right now if a customer comes, he lands on to a node and remains there forever. This has two major issues:&lt;br /&gt;
&lt;br /&gt;
1) We have to overprovision each node with ability to handle worse case capacity.&lt;br /&gt;
&lt;br /&gt;
2) If two or three high profile customers lands on to same node then we need to move them manually.&lt;br /&gt;
&lt;br /&gt;
3) We need to cut over new nodes and we already have over 100+ nodes.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
Its a pain managing these nodes and I waste lot of my time in chasing node specific issues. I loath when I know I have to chase this env issue.&lt;br /&gt;
&lt;br /&gt;
I really hate human intervention as if it were up to me I would just automate thing and just enjoy the fruits of automation and spend quality time on major issues rather than mundane task,call me lazy but thats a good quality.&lt;br /&gt;
&lt;br /&gt;
So Finally now I am at a stage where I can put nodes behing HAProxy in QA env. today we were testing the HA config and first problem I immediately saw is that we have to use sticky sessions due to some design issue that will take long time to solve. Now we were doing sticky session by JSESSIONID like&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; appsession JSESSIONID len 32 timeout 12h request-learn&lt;br /&gt;
&lt;br /&gt;
Immediately I realized that Two tomcats can generate same JSESSIONID so there is a potential for security breach.&amp;nbsp; Thank god tomcat has a way to add a node identifier to JSESSIONID to solve this issue :).&amp;nbsp; You can go to conf/server.xml and add jvmRoute to Engine like&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This way your JSESSIONID would be generated like BBF8B5EF74EAAECE0278DC92A9F1353D.192.155.4.5_8080&lt;br /&gt;
&lt;br /&gt;
As a side effect now&amp;nbsp; we would know by looking at cookie as to which node is serving the request and this will help in trouble shooting node specific issues.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I hope to cut down the 100+nodes to 40 nodes after this HA.&amp;nbsp; I will keep 40 because we have pod/farms in each DC so we need to overprovision each pod else this could have been reduced to 10 or 15 nodes. The pods are there to avoid DC meltdown.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/R7mn8tMCRfY" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/4273955741471003336/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/haproxy-and-tomcat-jsessionid.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4273955741471003336?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4273955741471003336?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/R7mn8tMCRfY/haproxy-and-tomcat-jsessionid.html" title="Haproxy and tomcat JSESSIONID" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/haproxy-and-tomcat-jsessionid.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0YBR3gzfyp7ImA9WhBRFkU.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-8419192525144695943</id><published>2013-03-07T13:38:00.004-06:00</published><updated>2013-03-07T13:39:16.687-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-07T13:39:16.687-06:00</app:edited><title>%E2%80%90 and links issue</title><content type="html">Ran into an issue where a customer creates public link to a file and pastes into word and it works fine but when he converts it to PDF it no longer works thought the&amp;nbsp; link in browser url bar looks exact same.&amp;nbsp; I reproduced it and saw that "h-s" in link url was getting converted to h%E2%80%90s. After some Googling it turned out to be an adobe bug http://forums.adobe.com/message/2807241 related to hyphen character.&lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/Y2G3UCf7crM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/8419192525144695943/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/e28090-and-links-issue.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8419192525144695943?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8419192525144695943?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/Y2G3UCf7crM/e28090-and-links-issue.html" title="%E2%80%90 and links issue" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/e28090-and-links-issue.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUMHRn48cCp7ImA9WhBREUQ.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-9111132548513641174</id><published>2013-03-01T21:03:00.002-06:00</published><updated>2013-03-01T21:03:57.078-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-01T21:03:57.078-06:00</app:edited><title>Final nail in BDB coffin-Part2</title><content type="html">Missing indexes can be really pain.&amp;nbsp; We were migrating data from bdb to mysql and the migration on few nodes were going on for 3-4 days. As I was involved in firefight, I didnt got a chance to look at it. But on one node only 10% of the workgroups were migrated and while chasing a customer reported issue I found on index was missing.&amp;nbsp; we created that index and restarted migration and wow it finished in 5 hours.&lt;br /&gt;
&lt;br /&gt;
Finally we ended up with 400M+ more rows in our mysql infrastructure and now bdb is finally out of the product. Hurray!! &amp;nbsp; &lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/xarksjLNm8o" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/9111132548513641174/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/03/final-nail-in-bdb-coffin-part2.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9111132548513641174?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9111132548513641174?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/xarksjLNm8o/final-nail-in-bdb-coffin-part2.html" title="Final nail in BDB coffin-Part2" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/03/final-nail-in-bdb-coffin-part2.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkABSX49eyp7ImA9WhBTGEo.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-7856573334071588660</id><published>2013-02-14T15:52:00.001-06:00</published><updated>2013-02-14T15:52:38.063-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-14T15:52:38.063-06:00</app:edited><title>Spring an Quartz JobDataMap serialization exception</title><content type="html">We dont run our nodes in HA yet and once a customer registers he is assigned a node and he lives there. Problem is that if the node dies we incur a downtime for that customer and also we need to overallocate hardware to prepare for worse case scenario.&amp;nbsp; for the past 6 months I have been working to making the code stateless so that we can do HA and reduce our node count by 4 times.&lt;br /&gt;
&lt;br /&gt;
So we used to run quartz using in memory scheduler but for HA I need to run quartz in a cluster. We chose org.quartz.impl.jdbcjobstore.JobStoreTX for this.&lt;br /&gt;
&lt;br /&gt;
Problem was that as soon as I tried it I ran into issues because I was injecting spring beans into our quartz job using JobDataMap and JobStoreTX was trying to serialize the jobData into a table and our spring beans are not serializable.&amp;nbsp; There were two options:&lt;br /&gt;
&lt;br /&gt;
1) Load the entire applicationContext in each job and read the bean from there.&lt;br /&gt;
&lt;br /&gt;
2) Use the schedulerContextAsMap.&lt;br /&gt;
&lt;br /&gt;
After evaluating options I found scheduler context as the best option .The way  to do this would be&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;bean id="haQuartzScheduler" class="org.springframework.scheduling.quartz.SchedulerFactoryBean"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="configLocation" value="classpath:quartz.properties"/&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="triggers"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;list&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;ref bean="CommitFileJobTrigger" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/list&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;property name="schedulerContextAsMap"&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;map&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry key="commitFileJobHelper" value-ref="commitFileJobHelper" /&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;entry key="numThreads" value="2" /&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/map&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/property&amp;gt;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;lt;/bean&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In the quartz job I wrote a function&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; protected &lt;t&gt; T getSchedulerContextBean(JobExecutionContext context, String beanName) throws JobExecutionException {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; SchedulerContext schedulerContext;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; try {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; schedulerContext = context.getScheduler().getContext();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; } catch (SchedulerException e) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; throw new JobExecutionException(e);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; T bean = (T)schedulerContext.get(beanName);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; return bean;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&lt;/t&gt;&lt;br /&gt;
&lt;br /&gt;
and then all jobs can use this function like&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; CommitFileJobHelper commitFileJobHelper = getSchedulerContextBean(context, "commitFileJobHelper");&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/3zoo-6v773g" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/7856573334071588660/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/02/spring-quartz-jobdatamap-serialization.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7856573334071588660?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7856573334071588660?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/3zoo-6v773g/spring-quartz-jobdatamap-serialization.html" title="Spring an Quartz JobDataMap serialization exception" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/02/spring-quartz-jobdatamap-serialization.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CUUFR3wycSp7ImA9WhBREUQ.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-9039263245884657889</id><published>2013-02-14T15:43:00.002-06:00</published><updated>2013-03-01T21:00:16.299-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-03-01T21:00:16.299-06:00</app:edited><title>Final nail in BDB coffin</title><content type="html">This weekend we would finally put the Final nail in BDB coffin.&amp;nbsp; We were using BDB in webdav, Cloud file and backup product. Over the course of last 6 months my team was able to remove BDB from webdav and Cloud file and the mysql is scaling fine. We have now billions of rows in mysql and last weekend we had a pilot migration of few backup product nodes.&amp;nbsp; This weekend we would strive to migrate all the backup nodes. I am hoping we would increase the no of rows in mysql by 30%.&lt;br /&gt;
&lt;br /&gt;
Mysql and sharding rocks!!&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/QoLWZ56uzW0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/9039263245884657889/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/02/final-nail-in-bdb-coffin.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9039263245884657889?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9039263245884657889?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/QoLWZ56uzW0/final-nail-in-bdb-coffin.html" title="Final nail in BDB coffin" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/02/final-nail-in-bdb-coffin.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DkMGRX4-eyp7ImA9WhBTFEo.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-4114649192573279146</id><published>2013-02-09T23:33:00.002-06:00</published><updated>2013-02-09T23:33:44.053-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-02-09T23:33:44.053-06:00</app:edited><title>Being ruthless</title><content type="html">Lot of time our system deals with abuse. For e.g. some customer will move the same file between 2 folders the whole day and normally it doesn't cause issues but in some extreme cases it would generates hundreds of thousands of records.&amp;nbsp; Also there are some customers who have bots written that will make millions of call in a day. Or sometimes some customer will put malware on FTP and use our servers as a way to spread malware, this causes antvirus to flag our site as spammers causing field issues. One of the strategy we use to deal with abuse is to throttle the user for a while but sometimes it hurts good users also. In some cases the abuse is so much that it can bring down the system or hurt other genuine users. Like in case of malware we just block the customer as there is not time to reach the customer and solve the issue, some user might have accidentally share the file but we have to be ruthless.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/jrZHfqK5-GQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/4114649192573279146/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/02/being-ruthless.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4114649192573279146?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/4114649192573279146?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/jrZHfqK5-GQ/being-ruthless.html" title="Being ruthless" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/02/being-ruthless.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0QNRHw9fip7ImA9WhNaFUs.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-7547129503622682971</id><published>2013-01-30T11:03:00.001-06:00</published><updated>2013-01-30T11:03:15.266-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-30T11:03:15.266-06:00</app:edited><title>Feels great to see that your product is used</title><content type="html">I work remotely for a company in california from texas and was working on a customer ticket and saw that the customer account in my city only.&lt;br /&gt;
&lt;br /&gt;
Feels good to see that the product you work on is used globally and even at a stone's throwaway from you.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/EWhIdP6RAQg" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/7547129503622682971/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/01/feels-great-to-see-that-your-product-is.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7547129503622682971?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7547129503622682971?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/EWhIdP6RAQg/feels-great-to-see-that-your-product-is.html" title="Feels great to see that your product is used" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/01/feels-great-to-see-that-your-product-is.html</feedburner:origLink></entry><entry gd:etag="W/&quot;C0AHRHk6fyp7ImA9WhNbEkQ.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-3485510197223169392</id><published>2013-01-15T17:14:00.001-06:00</published><updated>2013-01-15T17:15:35.717-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-15T17:15:35.717-06:00</app:edited><title>openldap adding an index</title><content type="html">We use ldap to store customer metadata like users, customers and other stuff. Right now each node has a ldap and we are trying to consolidate ldaps across different nodes. So I loaded one ldap with data from 20 nodes and some of the queries were taking 4000 msec.&amp;nbsp; So I saw that indexes were missing .&lt;br /&gt;
&lt;br /&gt;
I went to&amp;nbsp; slapd.conf&amp;nbsp; and&amp;nbsp; added&lt;br /&gt;
&lt;br /&gt;
index customerNumber,customerDomain,email&amp;nbsp;&amp;nbsp; eq&lt;br /&gt;
index customerName eq,sub&lt;br /&gt;
&lt;br /&gt;
I also updated the cache size to 4G in DB_CONFIG file&lt;br /&gt;
&lt;br /&gt;
set_cachesize&amp;nbsp;&amp;nbsp; 4 0 1&lt;br /&gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I restarted ldap and suddenly things were flying but something&amp;nbsp; was fishy as the new numbers for 100 threads was faster then previous 1 thread time for all operations. So I picked one query and ran it manually and found that a simple query like below was coming empty&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
ldapsearch -x -H ldap://localhost:389 -b "dc=xxx,dc=com" "(&amp;amp;(objectclass=objuser)(email=kpatel@comcast1.net))"|grep email|more&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
I removed the index and restarted ldap and same query started returning results. Upon googling I found that if you add a new index you have to reindex your data, wth.&amp;nbsp; so I&lt;br /&gt;
1) shutdown ldap&lt;br /&gt;
2) ran&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
/usr/sbin/slapindex -f ~/openldap/etc/slapd.conf -b "dc=xxx,dc=com"&lt;br /&gt;
3) started ldap&lt;br /&gt;
and now the query was returning results.&lt;br /&gt;
&lt;br /&gt;
And LDAP rocks even 500 threads its rocking fast.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/AOVR199TpLM" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/3485510197223169392/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/01/openldap-adding-index.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3485510197223169392?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3485510197223169392?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/AOVR199TpLM/openldap-adding-index.html" title="openldap adding an index" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/01/openldap-adding-index.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUYASX0_eSp7ImA9WhNbEkw.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-1937264092895937460</id><published>2013-01-14T20:32:00.001-06:00</published><updated>2013-01-14T20:32:28.341-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-14T20:32:28.341-06:00</app:edited><title>It seems people work less in december in US</title><content type="html">&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&amp;nbsp; &lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
Traffic to my blog was down to 60% in december and I was worried what had changed but I am glad to see that its back to original level in 2nd week of January.&amp;nbsp; It seems people work less in December.&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: left;"&gt;
&lt;br /&gt;&lt;/div&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://1.bp.blogspot.com/-AaZjFIT1TZk/UPS_UIZFMvI/AAAAAAAACA8/5ArUdPHdXSA/s1600/Screenshot-1.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="95" src="http://1.bp.blogspot.com/-AaZjFIT1TZk/UPS_UIZFMvI/AAAAAAAACA8/5ArUdPHdXSA/s400/Screenshot-1.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/RRFhyRrdIes" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/1937264092895937460/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/01/it-seems-people-work-less-in-december.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/1937264092895937460?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/1937264092895937460?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/RRFhyRrdIes/it-seems-people-work-less-in-december.html" title="It seems people work less in december in US" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://1.bp.blogspot.com/-AaZjFIT1TZk/UPS_UIZFMvI/AAAAAAAACA8/5ArUdPHdXSA/s72-c/Screenshot-1.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/01/it-seems-people-work-less-in-december.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DE4HR3gyeyp7ImA9WhNbEkw.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-8391944220764752034</id><published>2013-01-14T20:28:00.004-06:00</published><updated>2013-01-14T20:28:56.693-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-14T20:28:56.693-06:00</app:edited><title>Fun to see bugs</title><content type="html">Received this spam email today morning and first thing i saw that instead of image it had a path of "c:\users\Manoj". :)&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://2.bp.blogspot.com/-t8bOuWePKms/UPS-055SMqI/AAAAAAAACA0/VUCwVlb7VOk/s1600/Screenshot.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="201" src="http://2.bp.blogspot.com/-t8bOuWePKms/UPS-055SMqI/AAAAAAAACA0/VUCwVlb7VOk/s400/Screenshot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/4JAIkfIIlRQ" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/8391944220764752034/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/01/fun-to-see-bugs.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8391944220764752034?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8391944220764752034?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/4JAIkfIIlRQ/fun-to-see-bugs.html" title="Fun to see bugs" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://2.bp.blogspot.com/-t8bOuWePKms/UPS-055SMqI/AAAAAAAACA0/VUCwVlb7VOk/s72-c/Screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/01/fun-to-see-bugs.html</feedburner:origLink></entry><entry gd:etag="W/&quot;CEYCQ30yfip7ImA9WhNUEUs.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-766213085486162442</id><published>2013-01-02T15:29:00.002-06:00</published><updated>2013-01-02T15:29:22.396-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2013-01-02T15:29:22.396-06:00</app:edited><title>LDAP wildcard search</title><content type="html">I was able to make a LDAP query with wild card on a field username like&lt;br /&gt;
&lt;br /&gt;
(&amp;amp;(username=*kpatel))&lt;br /&gt;
&lt;br /&gt;
but I wasnt able to make it on a field like &lt;br /&gt;
&lt;br /&gt;
(&amp;amp;(customername=*kpatel))&lt;br /&gt;
&lt;br /&gt;
me and my teammate searched and finally found that username was inheriting from a super type uid and thats why it was working on it but customername was not.&lt;br /&gt;
&lt;br /&gt;
Luckily solution to the problem was to add a SUBSTR clause to enable wildcard match on a field in ldap schema.&lt;br /&gt;
&lt;br /&gt;
SUBSTR caseIgnoreSubstringsMatch &lt;br /&gt;
&lt;br /&gt;&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/rSFIa1HKC_0" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/766213085486162442/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2013/01/ldap-wildcard-search.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/766213085486162442?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/766213085486162442?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/rSFIa1HKC_0/ldap-wildcard-search.html" title="LDAP wildcard search" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2013/01/ldap-wildcard-search.html</feedburner:origLink></entry><entry gd:etag="W/&quot;D0EGRXk7eSp7ImA9WhNVEUk.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-8851969179973691819</id><published>2012-12-21T21:07:00.001-06:00</published><updated>2012-12-21T21:07:04.701-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-21T21:07:04.701-06:00</app:edited><title>Making life easy at mysql command line</title><content type="html">I was annoyed with these same problems especially paging query results&amp;nbsp; at mysql command line or grepping within results or recording queries for future purpose. For all those debugging productions issues related to mysql&amp;nbsp; here is an excellent blog from perconna to make your life easy&lt;br /&gt;&lt;br /&gt;http://www.mysqlperformanceblog.com/2012/12/21/be-productive-with-the-mysql-command-line/&amp;nbsp; &lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/2AqPA4yq1aI" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/8851969179973691819/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/making-life-easy-at-mysql-command-line.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8851969179973691819?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/8851969179973691819?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/2AqPA4yq1aI/making-life-easy-at-mysql-command-line.html" title="Making life easy at mysql command line" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/making-life-easy-at-mysql-command-line.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DU8BRHY_eyp7ImA9WhNWGUg.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-9143729775865438783</id><published>2012-12-19T16:57:00.001-06:00</published><updated>2012-12-19T16:57:35.843-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-19T16:57:35.843-06:00</app:edited><title>CGlib enhancer and finalize method</title><content type="html">Yesterday was a bad day because one of the node after updating to tomcat7 ran into full garbage collection. I took a heap dump and finally found that one of the enhanced class had 300K references hanging around in finalizer thread. I was&amp;nbsp; enhancing SimpelJDBCTemplate to find out time taken by each query and log it. The reason this happened because CGLib also enhanced the finalize method and in the method interceptor I was&amp;nbsp; delegating the call to the delegate object which was not existing at that time. Anyways the solution was to skip the enhancing of finalize by adding a callback filter and nooping on it.&lt;br /&gt;
&lt;br /&gt;
As you can see in below code the filter returns 0 if finalize method is called and that means use the callback at 0th position in the callbacks which is a NoOp callback and for all others it uses 1st position which is my real code.&amp;nbsp; &lt;br /&gt;
&lt;br /&gt;
The simple code fix was&lt;br /&gt;
&lt;br /&gt;
&amp;nbsp;&amp;nbsp;&amp;nbsp; public static SimpleJdbcTemplate createPerfInterceptedTemplate(Class callerClass, DataSource dataSource) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; final SimpleJdbcTemplate simpleJdbcTemplate = new SimpleJdbcTemplate(dataSource);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; final String className = callerClass.getSimpleName();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; Enhancer enhancer = new Enhancer();&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; enhancer.setSuperclass(SimpleJdbcTemplate.class); &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; enhancer.setCallbackFilter(FINALIZE_FILTER);&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; enhancer.setCallbacks(new Callback[]{NoOp.INSTANCE, new MethodInterceptor() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; @Override&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; public Object intercept(Object obj, Method method, Object[] args, MethodProxy proxy) throws Throwable {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; ..........do your real delegate code here..........&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;}&lt;br /&gt;&lt;br /&gt;&lt;br /&gt;private static final CallbackFilter FINALIZE_FILTER = new CallbackFilter() {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; public int accept(Method method) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; if (method.getName().equals("finalize") &amp;amp;&amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method.getParameterTypes().length == 0 &amp;amp;&amp;amp;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; method.getReturnType() == Void.TYPE) {&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 0;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return 1;&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;br /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; };&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/zSOnA4Czlm4" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/9143729775865438783/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/cglib-enhancer-and-finalize-method.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9143729775865438783?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/9143729775865438783?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/zSOnA4Czlm4/cglib-enhancer-and-finalize-method.html" title="CGlib enhancer and finalize method" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/cglib-enhancer-and-finalize-method.html</feedburner:origLink></entry><entry gd:etag="W/&quot;DUMNQHY-cCp7ImA9WhNWGUg.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-7748978893898879728</id><published>2012-12-19T16:51:00.003-06:00</published><updated>2012-12-19T16:51:31.858-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-19T16:51:31.858-06:00</app:edited><title>Tomcat7 session fixation and session listener</title><content type="html">Ran into an interesting issue. We use flash uploader in our web ui for browsers that dont support html5 and flash has a problem that each request it makes to server has a new session because it wont send any cookies back to server. The only way to circumvent around this is to send original sessionId as a post parameter and on server cache all the sessions in tomcat memory and then join this new session to the original session using sessionid coming in post.&lt;br /&gt;
&lt;br /&gt;
Anyways long story short we updated to tomcat7 and suddenly one of our feature that allows us to impersonate a user broke.&amp;nbsp; Finally nailed it to&amp;nbsp; a security fix in tomcat7 that will renew sessionId on basic authentication but the issue is that to do flash based file upload we relied on HttpSessionListener.sessionCreated to cache all sessions by sessionId.&amp;nbsp; And when&amp;nbsp; tomcat7 was renewing sessionId&amp;nbsp; it was not calling&amp;nbsp; the sessionCreated event for the new session. There were two ways to solve it:&lt;br /&gt;
&lt;br /&gt;
1) Disable session fixation security fix by adding&amp;nbsp; the below valve to context.xml . I did not chose to do this as it would make tomcat less secure.&lt;br /&gt;&lt;br /&gt;&amp;lt;Valve className="org.apache.catalina.authenticator.BasicAuthenticator"&amp;nbsp; changeSessionIdOnAuthentication="false"/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
2) Extract the code in HttpSessionListener.sessionCreated to a common method and call it manually during impersonation.&amp;nbsp; I chose this way for now as its more secure.&amp;nbsp; In future when tomcat fixes this bug I will remove this code.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/mKbvx_QBM8U" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/7748978893898879728/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/tomcat7-session-fixation-and-session.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7748978893898879728?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/7748978893898879728?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/mKbvx_QBM8U/tomcat7-session-fixation-and-session.html" title="Tomcat7 session fixation and session listener" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/tomcat7-session-fixation-and-session.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0EER3czeCp7ImA9WhNWFEg.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-5985562694036146845</id><published>2012-12-13T22:31:00.000-06:00</published><updated>2012-12-13T22:33:26.980-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-13T22:33:26.980-06:00</app:edited><title>Biggest relief from NOSQL to SQL migration</title><content type="html">This year my biggest accomplishment was to move our old NOSQL system from BDB/Cassandra to Mysql and so far its holding billions of rows and working fine.&amp;nbsp; Though this move has given me and my buddy peace and good sleep and I can now focus on other fires. But the biggest relief comes from being able to delegate some tasks to junior team and also being able to quickly script adhoc requirements quickly.&lt;br /&gt;
&lt;br /&gt;
For e.g. today I got an adhoc requirement to find list of customers with &amp;gt; 1000 versions of a single file.&amp;nbsp; Had it been BDB I would have to write a program and then run it on each app node to find the answer and it would have taken days to get this info.&amp;nbsp; But with mysql all I had to do was to write a script that will execute a federated query and get me the output so all I need to do is run something like &lt;br /&gt;
&lt;br /&gt;
nohup python sweep_all_shards.py "select pid, max(cnt) from (select customerid,file_id,count(version_id) cnt from \${SCHEMA_NAME}.version_\${TBL_SUFFIX} group by customer_id,file_id having count(version_id) &amp;gt;1000)a group by customerid" &amp;amp;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
and within 6 hours the script had sweepeed all the shards and got me the result. So I had to just do some grep/awk/sed to get the answer.&lt;br /&gt;
&lt;br /&gt;
Few weeks back I got some adhoc requirement to find max size of file uploaded by each customer and same I got it in less than one day whereas earlier I would have spent days getting this info.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Also one more advantage I see is that I have created a read only user on each mysql slave and&amp;nbsp; given access to production support people and as everyone knows relational database very few requirements come to me so I get more free time to work on more interesting things.&lt;br /&gt;
&lt;br /&gt;
Also last night mysql server crashed twice while creating index on a 85M record table and boy the DBAs knew how to recover it whereas when it was BDB it was an Achilles hill to recover data out of it and this time Ops team did it without involving everyone and they were all confident and relaxed and BDB/Cassandra was always panic mode.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/AdA5cKez1ro" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/5985562694036146845/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/biggest-relief-from-nosql-to-sql.html#comment-form" title="1 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/5985562694036146845?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/5985562694036146845?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/AdA5cKez1ro/biggest-relief-from-nosql-to-sql.html" title="Biggest relief from NOSQL to SQL migration" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>1</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/biggest-relief-from-nosql-to-sql.html</feedburner:origLink></entry><entry gd:etag="W/&quot;AkEDSH8zeSp7ImA9WhNWFEg.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-863947300519706786</id><published>2012-12-13T22:17:00.000-06:00</published><updated>2012-12-13T22:17:59.181-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-13T22:17:59.181-06:00</app:edited><title>Got first mysql table with 84M records</title><content type="html">wow this is the first time I had scaled a database with 84M records in one table. Though I didn't expected it to grow this big but a weird customer behaviour where he had 17K versions of a file and he moved it 5K times. 17K version * 5K move=85M events generated in one shard in one table.&lt;br /&gt;
&lt;br /&gt;
Within a month these will get purged as we retain last one month event, so table size will go down but it feels good that the system is behaving nice after adding the missing index on this 85M table, today its again sleeping like a baby.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;div class="separator" style="clear: both; text-align: center;"&gt;
&lt;a href="http://4.bp.blogspot.com/-iMSqCadIJa4/UMqn__5PaPI/AAAAAAAACAY/UXe2djugnwk/s1600/Screenshot.png" imageanchor="1" style="clear: left; float: left; margin-bottom: 1em; margin-right: 1em;"&gt;&lt;img border="0" height="128" src="http://4.bp.blogspot.com/-iMSqCadIJa4/UMqn__5PaPI/AAAAAAAACAY/UXe2djugnwk/s400/Screenshot.png" width="400" /&gt;&lt;/a&gt;&lt;/div&gt;
&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/fr2xxxmNsXs" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/863947300519706786/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/got-first-table-with-84m-records.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/863947300519706786?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/863947300519706786?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/fr2xxxmNsXs/got-first-table-with-84m-records.html" title="Got first mysql table with 84M records" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><media:thumbnail xmlns:media="http://search.yahoo.com/mrss/" url="http://4.bp.blogspot.com/-iMSqCadIJa4/UMqn__5PaPI/AAAAAAAACAY/UXe2djugnwk/s72-c/Screenshot.png" height="72" width="72" /><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/got-first-table-with-84m-records.html</feedburner:origLink></entry><entry gd:etag="W/&quot;A0YNQ3s8cCp7ImA9WhNWFE4.&quot;"><id>tag:blogger.com,1999:blog-5003701650524272230.post-3105179922954686073</id><published>2012-12-13T16:53:00.000-06:00</published><updated>2012-12-13T16:53:12.578-06:00</updated><app:edited xmlns:app="http://www.w3.org/2007/app">2012-12-13T16:53:12.578-06:00</app:edited><title>A copy paste mistake can bring down a server</title><content type="html">we recently migrated our eventstore on Mysql and I did a small boo boo.&amp;nbsp; I had two tables event and event_details and I had created two indexes on it&lt;br /&gt;
&lt;br /&gt;
CREATE INDEX events_${TBL_SUFFIX}_i2 ON events_${TBL_SUFFIX} (event_detail_event_guid, pid);&lt;br /&gt;
&lt;br /&gt;
CREATE INDEX event_details_${TBL_SUFFIX}_i1 ON events_${TBL_SUFFIX} (event_detail_event_guid, pid);&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
As you can notice the boo boo in second index Instead of creating it on event_details table I created the same index on event table :(.&lt;br /&gt;
&lt;br /&gt;
Yesterday night a shard event_detail table balloned to 85M records and there were 20 threads doing a full table scan on this table.&amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
so I fixed the copy paste mistake and generated ddls for each shard but the mysql server kept going Out of memory everytime it tried creating index on this 85M record table.&amp;nbsp; Ultimately the only way to get it done was to start mysql on diff port so no one will connect&amp;nbsp; to it and then give innodb more memory and create index, reset innodb settings back and then restart the server.&lt;br /&gt;
&lt;br /&gt;
All in all it took 6 hours in night to fix the after effects of this copy paste mistake.&lt;img src="http://feeds.feedburner.com/~r/ProgrammingFunAtStartup/~4/gKedJuweHuc" height="1" width="1"/&gt;</content><link rel="replies" type="application/atom+xml" href="http://neopatel.blogspot.com/feeds/3105179922954686073/comments/default" title="Post Comments" /><link rel="replies" type="text/html" href="http://neopatel.blogspot.com/2012/12/a-copy-paste-mistake-can-bring-down.html#comment-form" title="0 Comments" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3105179922954686073?v=2" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/5003701650524272230/posts/default/3105179922954686073?v=2" /><link rel="alternate" type="text/html" href="http://feedproxy.google.com/~r/ProgrammingFunAtStartup/~3/gKedJuweHuc/a-copy-paste-mistake-can-bring-down.html" title="A copy paste mistake can bring down a server" /><author><name>Kalpesh Patel</name><uri>http://www.blogger.com/profile/05753943463214172718</uri><email>noreply@blogger.com</email><gd:image rel="http://schemas.google.com/g/2005#thumbnail" width="16" height="16" src="http://img2.blogblog.com/img/b16-rounded.gif" /></author><thr:total>0</thr:total><feedburner:origLink>http://neopatel.blogspot.com/2012/12/a-copy-paste-mistake-can-bring-down.html</feedburner:origLink></entry></feed>
