-
1. Re: empty journal file
clebert.suconic Jun 20, 2011 11:32 AM (in response to madalina.grama)When we reuse a file (through reclaiming), we just change the file-ID to a new ID. Each record carries the file_ID (and the record ID as well).
Any record not matching the fileID is ignored.
We do that for performance reasons. We don't want to cleanup every byte on the file. We just change a single byte and the whole file becomes logically empty.
-
2. Re: empty journal file
madalina.grama Jun 21, 2011 3:15 AM (in response to clebert.suconic)Thanks for the quick reply.
Please correct me if I'm wrong:
You mark a journal as reusable when all its records are somewhere marked to be deleted. A record is marked to be deleted only when its message finished going through all of the queues it needed to go through. So a file with records marked to be deleted should be of no interest, since all those messages were taken care of, and the ones that went to DLQ can still be viewed with PrintData. Or files that have records that went to DLQ are not eligible for reclaim?
And if I supposedly need to access the records from a reclaimable file (I guess I would have to implement my own mechanism), would the records still be trusted to contain my data left untouched?
-
3. Re: empty journal file
clebert.suconic Jun 21, 2011 9:48 AM (in response to madalina.grama)"So a file with records marked to be deleted should be of no interest"
The file will be either deleted, or reused depending on your min-files configuration.
and the ones that went to DLQ can still be viewed with PrintData.
When a message is moved to DLA (aka DLQ) we make a copy of the message, hence the old one will be ready to be deleted on the journal.
And if I supposedly need to access the records from a reclaimable file (I guess I would have to implement my own mechanism), would the records still be trusted to contain my data left untouched?
You may try, but for what matters for us, the data is gone. You can try looking for records on old IDs, but the file may be reused a number of times. That means that eventually you may have records from N number of previous usages.
You may try that for debug, maybe change print-data to print records used by previous usages, but I don't think you can make any system to trust this procedure.