3 Replies Latest reply on Jun 21, 2011 9:48 AM by Clebert Suconic

    empty journal file

    Madalina Grama Newbie

      Hi all.

       

      Any ideas what might be the reason why PrintData tells me there are 0 records in a Journal file when I know there are? (if I open it with Notepad++ I can see records)

      Isn't an empty journal file supposed to be filled with JJJJJJJ only?

      I've debugged a little bit and noticed that the records are not marked to be deleted and that file is not reclaimable either.

      I can't identify a pattern between the files that show records and those that don't.

      Is there something like a Journal file header that marks is as not to be decoded?

       

      I will post the journals if there is no logical explanation for why I've just said.

       

      Thanks.

        • 1. Re: empty journal file
          Clebert Suconic Master

          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 Newbie

            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 Master

              "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.