File not written when transactions enabled?

2005-08-24
2013-06-03
  • Bryan Thompson

    Bryan Thompson - 2005-08-24

    I am seeing an odd effect using the current CVS where the .db file is not being written (zero length) when transactions are enabled.  Disabling the transactions results in a .db file of an appropriate size.  I have not tried to track this down to a test case yet.

    -bryan

     
    • Kevin Day

      Kevin Day - 2005-08-24

      Bryan-

      Are you certain that you are:

      a) commiting your transactions
      b) closing the record manager

      ?

      I went through the exact same thing myself when I first started my testing, only to realize that I wasn't comitting...

      If you are running with transactions disabled, then my auto-commit code is going to be kicking in, which is why you are seeing the file size grow.

      - K

       
      • Bryan Thompson

        Bryan Thompson - 2005-08-25

        Kevin,

        Clearly I need to look into this further.  However, I am reasonably sure that I am committing the transaction.  Given that, there SHOULD NOT be a requirement to close the record manager.  The transaction is ACID, so everything should already be sync'd to disk, right?

        -bryan

         
    • Kevin Day

      Kevin Day - 2005-08-25

      Actually, if you don't close the record manager explicitly, then it is possible to have transactions still in the log.  When you re-open the record manager, it will pull the items from the log and move them into the db file, so it is absolutely ACID - but it's the combination of the log and the db file that is ACID - not just the db file.

      The transaction manager caches up to 10 transactions in the log file before commiting them to the db file (I believe this number is configurable).

      - K

       

Log in to post a comment.