Bug 46682 - Patch locks should expire if a patch is marked for retry
Summary: Patch locks should expire if a patch is marked for retry
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: New Bugs (show other bugs)
Version: 528+ (Nightly build)
Hardware: Other OS X 10.5
: P2 Normal
Assignee: Eric Seidel (no email)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-09-27 17:35 PDT by Eric Seidel (no email)
Modified: 2010-09-27 19:21 PDT (History)
2 users (show)

See Also:


Attachments
Patch (4.22 KB, patch)
2010-09-27 17:38 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff
Patch (5.11 KB, patch)
2010-09-27 18:12 PDT, Eric Seidel (no email)
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Eric Seidel (no email) 2010-09-27 17:35:50 PDT
Patch locks should expire if a patch is marked for retry
Comment 1 Eric Seidel (no email) 2010-09-27 17:38:42 PDT
Created attachment 69000 [details]
Patch
Comment 2 Adam Barth 2010-09-27 17:40:36 PDT
Comment on attachment 69000 [details]
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=69000&action=review

> WebKitTools/QueueStatusServer/handlers/updatestatus.py:68
> +        active_items.expire_item(queue_status.active_patch_id)
> +        active_items.put()

This is a read-modify-write.  Does it need to be in a transaction to ensure atomicity?
Comment 3 Eric Seidel (no email) 2010-09-27 17:44:10 PDT
(In reply to comment #2)
> (From update of attachment 69000 [details])
> View in context: https://bugs.webkit.org/attachment.cgi?id=69000&action=review
> 
> > WebKitTools/QueueStatusServer/handlers/updatestatus.py:68
> > +        active_items.expire_item(queue_status.active_patch_id)
> > +        active_items.put()
> 
> This is a read-modify-write.  Does it need to be in a transaction to ensure atomicity?

It would, yes.  I guess I shoudl do that. :)  Originally I thougtht a transaction wouldn't be needed here, but since we're replacing the whole list, that could cause badness in the multiple-writer case.
Comment 4 Eric Seidel (no email) 2010-09-27 18:12:49 PDT
Created attachment 69005 [details]
Patch
Comment 5 Eric Seidel (no email) 2010-09-27 18:15:26 PDT
Now with transactiony goodness.
Comment 6 Adam Barth 2010-09-27 18:39:11 PDT
Comment on attachment 69005 [details]
Patch

yay transactions
Comment 7 WebKit Commit Bot 2010-09-27 19:21:40 PDT
Comment on attachment 69005 [details]
Patch

Clearing flags on attachment: 69005

Committed r68474: <http://trac.webkit.org/changeset/68474>
Comment 8 WebKit Commit Bot 2010-09-27 19:21:45 PDT
All reviewed patches have been landed.  Closing bug.