Hi guys ! new week, new progresses...
I was able to fix the various issues I had with the creation of the persisted btree, including with addition of values in it (deletion is still to be fixed). I'm now trying to read back the infos from disk. This is a complex process, and I'd like to describe how it works here. - We first read the first page, which contains the RecordManagerHeader. Here, we have two cases : - we have some current and previous references on BOB (Btree of Btrees) and CPB (Copied Pages Btree) btrees : that mean we have had a pb while we were processing a modification. In this case, we must restart using teh previous references, and discard the current references. - the previous references are -1 : we can safely read the data, the modification has been successful. Let's deal with the second case atm (the first case is just a matter of using the right pointers on BOB and CPB btrees). - read the BOB Btree : - we create an empty btree - we read the current BOB header using the offset found in the RM header, and store it into the btree - we read the btree info and store them in the btree - we read the BOB rootPage and store it into the btree - read the CPB Btree (same algorithme) - for each btree stored in the BOB btree, find the newest revision, and load it - for each oldest revision, we can free the associated pages, they will not be needed anymore - for each copied pages stored in the CPB btree, we can free them, they will not be needed anymore and we are done ! Currently, I have completed the first steps, which is reading the BOB and CPB btrees, and the stored user btrees. I now have to manage the cleanup. More to come ! -- Regards, Cordialement, Emmanuel Lécharny www.iktek.com
