Changeset 344
- Timestamp:
- 04/19/08 01:54:30 (7 months ago)
- Location:
- trunk
- Files:
-
- 2 modified
-
thrudex/src/CLuceneIndex.cpp (modified) (1 diff)
-
thrudoc/src/BDBBackend.cpp (modified) (11 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/thrudex/src/CLuceneIndex.cpp
r340 r344 601 601 //the order of these things really matters 602 602 disk_searcher = l_disk_searcher; 603 disk_filter.reset( new UpdateFilter(l_disk_reader) ); 603 604 disk_reader = l_disk_reader; 604 disk_filter.reset( new UpdateFilter(disk_reader) ); 605 605 606 606 607 -
trunk/thrudoc/src/BDBBackend.cpp
r224 r344 7 7 #endif 8 8 /* hack to work around thrift and log4cxx installing config.h's */ 9 #undef HAVE_CONFIG_H 9 #undef HAVE_CONFIG_H 10 10 11 11 #if HAVE_LIBDB_CXX && HAVE_LIBBOOST_FILESYSTEM … … 25 25 #define BDB_BACKEND_MAX_BUCKET_SIZE 32 26 26 #define BDB_BACKEND_MAX_KEY_SIZE 64 27 #define BDB_BACKEND_MAX_VALUE_SIZE 409627 #define BDB_BACKEND_MAX_VALUE_SIZE 104096 28 28 29 29 LoggerPtr BDBBackend::logger (Logger::getLogger ("BDBBackend")); … … 40 40 } 41 41 42 try 42 try 43 43 { 44 44 this->db_env = new DbEnv (0); 45 u_int32_t env_flags = 45 u_int32_t env_flags = 46 46 DB_CREATE | // If the environment does not exist, create it. 47 47 DB_RECOVER | // run normal recovery … … 59 59 this->db_env->set_lk_detect (DB_LOCK_MINWRITE); 60 60 this->db_env->open (this->bdb_home.c_str (), env_flags, 0); 61 } 61 } 62 62 catch (DbException & e) 63 63 { … … 70 70 BDBBackend::~BDBBackend () 71 71 { 72 try 72 try 73 73 { 74 74 map<string, Db *>::iterator i; … … 79 79 this->db_env->close (0); 80 80 delete db_env; 81 } 82 catch (DbException & e) 81 } 82 catch (DbException & e) 83 83 { 84 84 LOG4CXX_ERROR (logger, string ("bdb error: ") + e.what ()); … … 94 94 ++dir_itr) 95 95 { 96 if ((fs::is_regular (dir_itr->status ())) && 96 if ((fs::is_regular (dir_itr->status ())) && 97 97 (dir_itr->path ().leaf ().find ("log.") == string::npos)) 98 98 { … … 222 222 if (seed != key_tmp) 223 223 { 224 // we got the one after it, it must be gone now, so return 224 // we got the one after it, it must be gone now, so return 225 225 // this one 226 226 Element e; … … 286 286 LOG4CXX_INFO (logger, "admin: creating db=" + data); 287 287 288 u_int32_t db_flags = 288 u_int32_t db_flags = 289 289 DB_CREATE | // allow creating db 290 DB_AUTO_COMMIT; // allow auto-commit 290 DB_AUTO_COMMIT; // allow auto-commit 291 291 db = new Db (this->db_env, 0); 292 292 db->open (NULL, // Txn pointer … … 302 302 return "done"; 303 303 } 304 // TODO delete_bucket, but have to figure out how to close the db 304 // TODO delete_bucket, but have to figure out how to close the db 305 305 // handles across all of the threads first... 306 306 return ""; … … 336 336 if (!db) 337 337 { 338 u_int32_t db_flags = DB_AUTO_COMMIT; // allow auto-commit 338 u_int32_t db_flags = DB_AUTO_COMMIT; // allow auto-commit 339 339 340 340 db = new Db (this->db_env, 0);
