all,
I am trying to store time series in Chronicle Map. The series are split into chunks, and every chunk is a separate map entry. I am wondering if anybody knows what is going to happen if JVM exits while an entry is currently being written to the Chronicle Map (while a BytesMarshaller is serialising)??
Would the memory mapped file end up with corrupt data?? Is there a work around??
When a new entry is put into Chronicle Map, this is commited by a single atomic operation. I. e. if a JVM exits at an arbitrary moment, during put operation, you might catch the following effects:
map.size()
out if sync with the actual data, +- 1But you are guaranteed not to have:
On the other hand, there is an important thing, regarding Chronicle Map versions 3.x, is that after such JVM exit a Chronicle Map segment, to which the entry was being put, is going to be locked. You could erase the lock state manually, or wait when corresponding API is added. This is not the case for Chronicle Map 2.x, it waits for 2 seconds and grabs the lock.