java - How to achieve transaction behaviour with file persisted Chronicle Map -


all,

i trying store time series in chronicle map. series split chunks, , every chunk separate map entry. wondering if knows going happen if jvm exits while entry being written chronicle map (while bytesmarshaller serialising)??

would memory mapped file end corrupt data?? there work around??

when new entry put chronicle map, commited single atomic operation. i. e. if jvm exits @ arbitrary moment, during put operation, might catch following effects:

  • map.size() out if sync actual data, +- 1
  • memory leaked (the memory used store entry)

but guaranteed not have:

  • a corrupted entry (which being put when jvm exited), wrong key or wrong value put correct key, observable in way: neither querying key nor iteration
  • any other entries, present in map moment of jvm exit, corrupted.
  • no contract/behavioral change chronicle map instance, mapped same file, in parallel instance in jvm exit, or mapped after (e. g., when jvm started again). in particular, able put entry key, being put when jvm exited, without problems.

on other hand, there important thing, regarding chronicle map versions 3.x, after such jvm exit chronicle map segment, entry being put, going locked. erase lock state manually, or wait when corresponding api added. this not case chronicle map 2.x, waits 2 seconds , grabs lock.


Comments

Popular posts from this blog

dns - How To Use Custom Nameserver On Free Cloudflare? -

python - Pygame screen.blit not working -

c# - Web API response xml language -