* src/GrampsDb/_GrampsBSDDB.py (load): Set max locks and objects
to 25000; Add DB_RECOVER flag to the environment. svn: r5827
This commit is contained in:
parent
f48f1c03bb
commit
f723ec0630
@ -1,3 +1,7 @@
|
||||
2006-01-24 Alex Roitman <shura@gramps-project.org>
|
||||
* src/GrampsDb/_GrampsBSDDB.py (load): Set max locks and objects
|
||||
to 25000; Add DB_RECOVER flag to the environment.
|
||||
|
||||
2006-01-24 Don Allingham <don@gramps-project.org>
|
||||
* src/DisplayModels.py: Fix column handling for repositories
|
||||
* src/RepositoryView.py: Columns for repositories
|
||||
|
@ -256,9 +256,11 @@ class GrampsBSDDB(GrampsDbBase):
|
||||
|
||||
self.env = db.DBEnv()
|
||||
self.env.set_cachesize(0,0x2000000) # 2MB
|
||||
self.env.set_lk_max_locks(25000)
|
||||
self.env.set_lk_max_objects(25000)
|
||||
self.env.set_flags(db.DB_LOG_AUTOREMOVE,1) # clean up unused logs
|
||||
# The DB_PRIVATE flag must go if we ever move to multi-user setup
|
||||
env_flags = db.DB_CREATE|db.DB_PRIVATE|\
|
||||
env_flags = db.DB_CREATE|db.DB_RECOVER|db.DB_PRIVATE|\
|
||||
db.DB_INIT_MPOOL|db.DB_INIT_LOCK|\
|
||||
db.DB_INIT_LOG|db.DB_INIT_TXN
|
||||
|
||||
@ -1124,24 +1126,22 @@ class GrampsBSDDB(GrampsDbBase):
|
||||
# but we can't help it. Disabling the secondary index
|
||||
# removal/rebuilding for batch transactions for now.
|
||||
|
||||
## table_flags = db.DB_CREATE|db.DB_AUTO_COMMIT
|
||||
## open_flags = db.DB_CREATE|db.DB_AUTO_COMMIT
|
||||
## dupe_flags = db.DB_DUP|db.DB_DUPSORT
|
||||
## # create new secondary indices to replace the ones removed
|
||||
## self.surnames = db.DB(self.env)
|
||||
## self.surnames.set_flags(db.DB_DUP)
|
||||
## self.surnames.open(self.full_name, "surnames", db.DB_BTREE,
|
||||
## flags=table_flags)
|
||||
## self.person_map.associate(self.surnames,find_surname,table_flags)
|
||||
## self.surnames.set_flags(dupe_flags)
|
||||
## self.surnames.open(self.full_name,"surnames",
|
||||
## db.DB_BTREE,flags=table_flags)
|
||||
## self.person_map.associate(self.surnames,find_surname,open_flags)
|
||||
|
||||
## self.reference_map_referenced_map = db.DB(self.env)
|
||||
## self.reference_map_referenced_map.set_flags(
|
||||
## db.DB_DUP)
|
||||
## self.reference_map_referenced_map.set_flags(dupe_flags)
|
||||
## self.reference_map_referenced_map.open(
|
||||
## self.full_name,
|
||||
## "reference_map_referenced_map",
|
||||
## db.DB_BTREE,
|
||||
## flags=table_flags)
|
||||
## self.full_name,"reference_map_referenced_map",
|
||||
## db.DB_BTREE,flags=open_flags)
|
||||
## self.reference_map.associate(self.reference_map_referenced_map,
|
||||
## find_referenced_handle,table_flags)
|
||||
## find_referenced_handle,open_flags)
|
||||
self.txn = None
|
||||
|
||||
def undo(self):
|
||||
|
Loading…
Reference in New Issue
Block a user