2 Replies Latest reply on Sep 1, 2011 12:07 AM by mickey8

    Journal file increases after executing PrintData or PrintPages

    mickey8

      We are using JBossEAP5.1.1 and HornetQ2.2.5(Tech Preview). We found the behavior that the journal file increases after executing PrintData or PrintPages. It did not occur on PrintData of HornetQ2.2.2Final.

       

       

      Here are steps I have done:

      1) There are no journal file in hornetq data directory.

      2) Starts the HornetQ --> 10 journal files is created(hornetq-data-1.hq - hornetq-data-10.hq)

      3) Executes the PrintData or PrintPages.

           PrintData: java -cp $JBOSS_HOME/common/lib/hornetq-core.jar:$JBOSS_HOME/common/lib/netty.jar org.hornetq.core.persistence.impl.journal.PrintData <bindings directory> <journal directory>

           PrintPages: java -cp $JBOSS_HOME/common/lib/hornetq-core.jar:$JBOSS_HOME/common/lib/netty.jar org.hornetq.core.paging.PrintPages <paging directory> <journal directory>

       

      The number of journal file is 12 after 3). 2 files(hornetq-data-11.hq, hornetq-data-12.hq) was increased. And 2 further files increase if 3) repeat.

      JournalImpl#load(final LoaderCallback loadManager, final boolean changeData) had changed from HornetQ2.2.5Final. And journal file was increased after processing this method.

       

      Could we use PrintData and PrintPages on HornetQ2.2.5(Tech Preview)?

       

      Thanks,

      Mikitaro Hachiyanagi

        • 1. Re: Journal file increases after executing PrintData or PrintPages
          clebert.suconic

          You can.. but always backup your data first...

           

           

          It would be better to runt it on another copy. PrintData will have its own sizes and it won't respect what's on the configs.

          • 2. Re: Journal file increases after executing PrintData or PrintPages
            mickey8

            Hi, Clebert.

             

            Thank you for your reply.

            OK, Now we use PrintData and PrintPages after backup.

             

            PrintData will have its own sizes and it won't respect what's on the configs.

            I saw the source code of JournalImpl#load(final LoaderCallback loadManager, final boolean changeData). If changeData is true, the journal file with no data is added to filesRepository as the free file. But if false, it just ignore. And new file is created by JournalFilesRepository#ensureMinFiles() because there is no file in JournalFilesRepository#freeFiles.

             

            At HornetQ2.2.2Final, the journal file with no data was always added to filesRepository. Those behavior had changed by HornetQ-714. I made the patch that add the code of HornetQ2.2.2Final to HornetQ2.2.5(Tech Preview). PrintData and PrintPages are very useful to confirm the data of journal. We want to use PrintData and PrintPages without the side effect if possible.

             

            Thanks,

            Mikitaro Hachiyanagi