New issue
Advanced search Search tips

Issue 911162 link

Starred by 2 users

Issue metadata

Status: Assigned
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: Android
Pri: 3
Type: Bug

Blocked on:
issue 886861



Sign in to add a comment

Partial data written to cache

Project Member Reported by jakearchibald@chromium.org, Dec 3

Issue description

I don't have reproducible steps, apologies. But here's what happened:

I was demoing https://bgfetch-http203.glitch.me/, which included initiating a podcast download in Chrome Canary on Android with the Experimental Web Platform features enabled, and terminating Chrome while the download was ongoing (as background fetch will continue the download).

When I returned to the app, it failed to show podcasts.

Turns out the XML feed for the podcasts had only partially cached. https://gist.github.com/jakearchibald/7b0b2afd434d780eb605d73c9e59c409 - this was what was in my cache vs what comes from the network.

https://glitch.com/edit/#!/bgfetch-http203?path=public/client.js:279:0 - Here's where the feed is cached. It's just fetching, then using cache.put.

Because I was closing Chrome (by swiping Chrome away in Androids app switcher), it feels like I've interrupted it during writing. Ideally it shouldn't allow a partial write like this.

Again, sorry I don't have proper recreation steps.
 
Blockedon: 886861
Owner: wanderview@chromium.org
Status: Assigned (was: Untriaged)
Currently there is no support for atomically inserting an entry into the simple disk_cache.  This will probably have to wait for the backend redesign where we will likely use a transactional database layer.
Correction, simple disk_cache should handle unexpected shutdown of the browser and delete the partial entry on next access.  Its unclear what is going on here.
Yeah, I've never seen this before or since. Naturally it happened during a live demo 😀

Sign in to add a comment