The Artima Developer Community
Sponsored Link

Agile Buzz Forum
Bozo Bug of the day

0 replies on 1 page.

Welcome Guest
  Sign In

Go back to the topic listing  Back to Topic List Click to reply to this topic  Reply to this Topic Click to search messages in this forum  Search Forum Click for a threaded view of the topic  Threaded View   
Previous Topic   Next Topic
Flat View: This topic has 0 replies on 1 page
James Robertson

Posts: 29924
Nickname: jarober61
Registered: Jun, 2003

David Buck, Smalltalker at large
Bozo Bug of the day Posted: Apr 8, 2006 3:04 PM
Reply to this message Reply

This post originated from an RSS feed registered with Agile Buzz by James Robertson.
Original Post: Bozo Bug of the day
Feed Title: Cincom Smalltalk Blog - Smalltalk with Rants
Feed URL: http://www.cincomsmalltalk.com/rssBlog/rssBlogView.xml
Feed Description: James Robertson comments on Cincom Smalltalk, the Smalltalk development community, and IT trends and issues in general.
Latest Agile Buzz Posts
Latest Agile Buzz Posts by James Robertson
Latest Posts From Cincom Smalltalk Blog - Smalltalk with Rants

Advertisement

The bug I referenced earlier was truly, truly stupid. I save blog entries in a serialized object file - one file per day, with each file being a collection of the post objects (with their associated comments, etc). When comments come in, the system looked up the existing entry, appended the new comment, and sent it off to the storage system for saving.

If you think about that, the problem is obvious. Say two people comment at about the same time. The first process gets started reading in the existing post, and is out on I/O. The second process does the same thing. They both append their comments to the post, and then they save. The save is serialized to prevent problems, but - in this case - the last one in "wins". That's why some people have seen a comment show up, and then disappear.

After I got a complaint about that, the problem came to me quickly - but I was in the car at the time. So this morning, I sat down to refactor the problem. The new code was pretty easy to slap in, and simplified the way comments get saved. So now the problem's gone - all that's left is the embarrassment over how stupid it was :)

Read: Bozo Bug of the day

Topic: Does Paulie work for the RIAA? Previous Topic   Next Topic Topic: Does it bring world peace, too?

Sponsored Links



Google
  Web Artima.com   

Copyright © 1996-2019 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use