Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:Fix a problem allowing shared memory to be recycled too early.
Downloads: Tarball | ZIP archive
Timelines: family | ancestors | descendants | both | multi-process
Files: files | file ages | folders
SHA1: c2f247c3724db35b87799122256f40206040c88b
User & Date: dan 2012-09-01 16:39:11.690
Context
2012-09-02
09:25
Fix a crash in multi-threaded tests that can occur if a call to lsm_open() fails. check-in: dd2489a645 user: dan tags: multi-process
2012-09-01
16:39
Fix a problem allowing shared memory to be recycled too early. check-in: c2f247c372 user: dan tags: multi-process
12:04
Do not open the log file until it is first written or read. This ensures that it is not opened before locks that prevent other processes from unlinking it have been obtained. check-in: 0f28f8317b user: dan tags: multi-process
Changes
Unified Diff Ignore Whitespace Patch
Changes to src/lsm_tree.c.
963
964
965
966
967
968
969

970
971
972
973
974
975
976
** recovery is successful.
*/
void lsmTreeInit(lsm_db *pDb){
  pDb->treehdr.iTransId = 1;
  pDb->treehdr.iFirst = 1;
  pDb->treehdr.nChunk = 2;
  pDb->treehdr.iWrite = LSM_SHM_CHUNK_SIZE + LSM_SHM_CHUNK_HDR;

}

/*
** Insert a new entry into the in-memory tree.
**
** If the value of the 5th parameter, nVal, is negative, then a delete-marker
** is inserted into the tree. In this case the value pointer, pVal, must be







>







963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
** recovery is successful.
*/
void lsmTreeInit(lsm_db *pDb){
  pDb->treehdr.iTransId = 1;
  pDb->treehdr.iFirst = 1;
  pDb->treehdr.nChunk = 2;
  pDb->treehdr.iWrite = LSM_SHM_CHUNK_SIZE + LSM_SHM_CHUNK_HDR;
  pDb->treehdr.iTreeId = 1;
}

/*
** Insert a new entry into the in-memory tree.
**
** If the value of the 5th parameter, nVal, is negative, then a delete-marker
** is inserted into the tree. In this case the value pointer, pVal, must be