This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 7767 - Atomic update of application cache is not well-defined
Summary: Atomic update of application cache is not well-defined
Status: VERIFIED WORKSFORME
Alias: None
Product: HTML WG
Classification: Unclassified
Component: pre-LC1 HTML5 spec (editor: Ian Hickson) (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Ian 'Hixie' Hickson
QA Contact: HTML WG Bugzilla archive list
URL: http://dev.w3.org/html5/spec/Overview...
Whiteboard:
Keywords: NE
Depends on:
Blocks:
 
Reported: 2009-09-29 16:47 UTC by Nikunj Mehta
Modified: 2010-10-04 14:47 UTC (History)
4 users (show)

See Also:


Attachments

Description Nikunj Mehta 2009-09-29 16:47:15 UTC
[[
Atomically, so as to avoid race conditions, perform the following substeps:

If the status of the cache group is either checking or downloading, then abort this instance of the update process, as an update is already in progress for them.
]]

Atomically is not well defined here. 

1. What happens if the state of the cache group changes mid-stream of this algorithm?
2. If the algorithm is already running when another instance is started, does the latter instance stay blocked?
Comment 1 Ian 'Hixie' Hickson 2009-09-30 10:12:06 UTC
"Atomically" is a well-understood term in computer science.

For your questions, it's not clear if by "algorithm" you mean the whole algorithm, or just the substep that is run atomically. Can you elaborate?
Comment 2 Nikunj Mehta 2009-09-30 16:50:04 UTC
(In reply to comment #1)
> "Atomically" is a well-understood term in computer science.
> 
> For your questions, it's not clear if by "algorithm" you mean the whole
> algorithm, or just the substep that is run atomically. Can you elaborate?
> 

In 2.3, list of pending master entries is being modified. Should this be isolated from 7.4?

In 2.4, 2.5, and 2.6, the status of a cache group is being inspected and in 2.7, the same is being modified. Should these be isolated from 5.6, 7.6, 10, 28, and failure step 6?
Comment 3 Ian 'Hixie' Hickson 2009-10-18 10:41:17 UTC
> In 2.3, list of pending master entries is being modified. Should this be
> isolated from 7.4?
>
> In 2.4, 2.5, and 2.6, the status of a cache group is being inspected and in
> 2.7, the same is being modified. Should these be isolated from 5.6, 7.6, 10,
> 28, and failure step 6?

Everything in step 2 runs atomically, so it's isolated from everything.