The old code updated anchor.basics.swap_file_sz _after_ copying all of the
available data into shared memory. An exception in the copying loop (e.g., the
map is out of available slots) could prevent that update. For another worker,
the entry would then appear to be fully completed (no writer, last slice size
stable, and last slice poiner is -1) and that worker would assert due to
anchor.basics.swap_file_sz mismatching the sum of slice sizes.
copyToShmSlice(e, anchor);
}
- anchor.basics.swap_file_sz = e.mem_obj->memCache.offset;
debugs(20, 7, "mem-cached available " << eSize << " bytes of " << e);
}
slice.size += copied;
e.mem_obj->memCache.offset += copied;
+ anchor.basics.swap_file_sz = e.mem_obj->memCache.offset;
}
/// finds a slot and a free page to fill or throws