Skip to content
Prev 44103 / 63424 Next

Risk of readRDS() not detecting race conditions with parallel saveRDS()?

On Sep 15, 2012, at 1:21 PM, Henrik Bengtsson wrote:

            
It's actually very probable that it will go undetected. In fact the probability in very high is you have large vectors, because you can corrupt almost the entire file and there will be no sign of corruption, because there is no checksum, so you can changed the the whole vector payload without any consequence. Just try saveRDS(rep(0L,100), "foo.rds", compress=T) and you can mess with anything after byte 21 and it will result in no error.

Cheers,
S