HttpCache::MetadataWriter writes metadata to the cached entry but does not read anything from the network. That's why it fills the load flag as LOAD_ONLY_FROM_CACHE. But this load flag is interpreted as a read-only request at the HttpCache::Transaction layer and thus the transaction gets added in entry_->readers. If there are 2 such metadata writers they will both be added and they will both invoke metadata writing to the disk entry. Since currently there is not limit to the buffer size the metadata writer writes all content in a single call and thus the 2 metadata writers end up being serialized at the disk entry layer.
But in the future this could change and can lead to incorrect metadata being written to the disk entry.
HttpCache::MetadataWriter writes metadata to the cached entry but does not read anything from the network. That's why it fills the load flag as LOAD_ONLY_FROM_CACHE. But this load flag is interpreted as a read-only request at the HttpCache::Transaction layer and thus the transaction gets added in entry_->readers. If there are 2 such metadata writers they will both be added and they will both invoke metadata writing to the disk entry. Since currently there is not limit to the buffer size the metadata writer writes all content in a single call and thus the 2 metadata writers end up being serialized at the disk entry layer.
But in the future this could change and can lead to incorrect metadata being written to the disk entry.
Comment 1 by shivanisha@chromium.org
, Feb 8 2017