Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion iocore/cache/CacheWrite.cc
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,14 @@ CacheVC::updateVector(int /* event ATS_UNUSED */, Event * /* e ATS_UNUSED */)
data should remain valid.
*/
if (alternate_index >= 0) {
alternate.copy_frag_offsets_from(write_vector->get(alternate_index));
/*if length changed, fragment offset also need to change, if not cause range request error*/
if (total_len != uint64_t(write_vector->get(alternate_index)->object_size_get())) {
Debug("cache_update", "update length changed, new length:%lu, old length:%ld", total_len,
write_vector->get(alternate_index)->object_size_get());
} else {
/*do not copy everytimes, if data changed, this copy makes range request error*/
alternate.copy_frag_offsets_from(write_vector->get(alternate_index));
}
}
alternate_index = write_vector->insert(&alternate, alternate_index);
}
Expand Down