|
Intersting - like I said, I haven't done much with jdbm2, but I definitely see why the different files might be needed - that could have a big impact on performance (not positive of that, but it does seem likely). Plus it drastically simplifies the paging logic.
The thought behind grabbing the db and lg files was that they may give us an idea of where the corruption originated from. But on further thinking, it would probably be better to know where the test app was executing at the time of termination immediately before the failure was found. The problem with this, of course, is that the failure may not be detected until several iterations after the cause (it depends on how thoroughly things get tested each iteration). I would want to see a full iteration through the records in the map at the beginning of each test cycle.
All that said, it seems that trying to track this particular issue in jdbm1 may not rise to a high level of priority... (esp if the problem doesn't occur in jdbm2). I hate to have you do a ton of testing, only to be told that it's not going to get fixed because there's a new kid on the block...
As a random aside, would you be able to package up the db files into a single file on successful close, then extract them on open? I know that may not work for your use-case, but thought I'd suggest it...
- K
----------------------- Original Message -----------------------
From: Jim Newsham <[email protected]>
Cc:
Date: Thu, 12 Aug 2010 12:59:16 -1000
Subject: Re: [Jdbm-general] Fwd: re: jdbm2 mailing list; jdbm corruption
Hi Kevin, Thanks for the reply. I'll start by saying that I misspoke -- the issue was produced on Windows 7, not Windows XP. See my comments inline.
Yeah, I believe that on application shutdown, I should be able to shut down the jdbm instance and then delete the log. That way, the user only sees a log file while the application is running, or if the application was killed or abruptly terminated. This is satisfactory for my case. Ok. Understandable, thanks for entertaining the question. As you know, jdbm creates x.db, x.lg. By contrast, jdbm2 creates x.dbf0, x.dbf.t, x.dbr.0, x.dbr.t, x.idf.0, x.idf.t, x.idr.0, x.idr.t. The code in BaseRecordManager.reopen() hints at what these are used for: _physFileFree = new RecordFile( _filename + DBF, FREE_BLOCK_SIZE); _physFile = new RecordFile( _filename + DBR, DATA_BLOCK_SIZE); _logicFileFree= new RecordFile( _filename +IDF,FREE_BLOCK_SIZE ); _logicFile = new RecordFile( _filename +IDR,TRANS_BLOCK_SIZE );
For sure, the disk did not run out of space in my test case. I have 86gb free. The database file had grown to 90mb at the time the corruption occurred.
Yep I wouldn't do that in a real world app. :)
Since I'm terminating the app from a different process, at some random time interval, the test case is indeterminate and I suspect that the issue will not be repeatable with any predictability. I'm not sure a specific db or log file would predispose the problem to happening -- it might be related purely to the timing of killing the process. For my test case I was exec'ing a new process once every second or so. If I were to back up the database before each exec, that would severely slow down the test. Recall that it took 12,500 iterations to produce the issue, and by that time the database had grown to 90gb. Instead of taking 2 or 3 hours, it would take 2 or 3 days to repeat the same number of iterations.
I removed the log file (after backing up both files), but the same exception continues to occur when I run CrashTest2.
Sure, I'll give that a try. Thanks, Jim ------------------------------------------------------------------------------
This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________
Jdbm-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jdbm-general |
------------------------------------------------------------------------------ This SF.net email is sponsored by
Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev
_______________________________________________ Jdbm-general mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/jdbm-general
