Changeset 344

Show
Ignore:
Timestamp:
04/19/08 01:54:30 (7 months ago)
Author:
jake
Message:

tweetscan bug fixes

Location:
trunk
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • trunk/thrudex/src/CLuceneIndex.cpp

    r340 r344  
    601601        //the order of these things really matters 
    602602        disk_searcher = l_disk_searcher; 
     603        disk_filter.reset( new UpdateFilter(l_disk_reader) ); 
    603604        disk_reader   = l_disk_reader; 
    604         disk_filter.reset( new UpdateFilter(disk_reader) ); 
     605 
    605606 
    606607 
  • trunk/thrudoc/src/BDBBackend.cpp

    r224 r344  
    77#endif 
    88/* hack to work around thrift and log4cxx installing config.h's */ 
    9 #undef HAVE_CONFIG_H  
     9#undef HAVE_CONFIG_H 
    1010 
    1111#if HAVE_LIBDB_CXX && HAVE_LIBBOOST_FILESYSTEM 
     
    2525#define BDB_BACKEND_MAX_BUCKET_SIZE 32 
    2626#define BDB_BACKEND_MAX_KEY_SIZE 64 
    27 #define BDB_BACKEND_MAX_VALUE_SIZE 4096 
     27#define BDB_BACKEND_MAX_VALUE_SIZE 104096 
    2828 
    2929LoggerPtr BDBBackend::logger (Logger::getLogger ("BDBBackend")); 
     
    4040    } 
    4141 
    42     try  
     42    try 
    4343    { 
    4444        this->db_env = new DbEnv (0); 
    45         u_int32_t env_flags =  
     45        u_int32_t env_flags = 
    4646            DB_CREATE     |   // If the environment does not exist, create it. 
    4747            DB_RECOVER    |   // run normal recovery 
     
    5959        this->db_env->set_lk_detect (DB_LOCK_MINWRITE); 
    6060        this->db_env->open (this->bdb_home.c_str (), env_flags, 0); 
    61     }  
     61    } 
    6262    catch (DbException & e) 
    6363    { 
     
    7070BDBBackend::~BDBBackend () 
    7171{ 
    72     try  
     72    try 
    7373    { 
    7474        map<string, Db *>::iterator i; 
     
    7979        this->db_env->close (0); 
    8080        delete db_env; 
    81     }  
    82     catch (DbException & e)  
     81    } 
     82    catch (DbException & e) 
    8383    { 
    8484        LOG4CXX_ERROR (logger, string ("bdb error: ") + e.what ()); 
     
    9494         ++dir_itr) 
    9595    { 
    96         if ((fs::is_regular (dir_itr->status ())) &&  
     96        if ((fs::is_regular (dir_itr->status ())) && 
    9797            (dir_itr->path ().leaf ().find ("log.") == string::npos)) 
    9898        { 
     
    222222            if (seed != key_tmp) 
    223223            { 
    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 
    225225                // this one 
    226226                Element e; 
     
    286286            LOG4CXX_INFO (logger, "admin: creating db=" + data); 
    287287 
    288             u_int32_t db_flags =  
     288            u_int32_t db_flags = 
    289289                DB_CREATE       |   // allow creating db 
    290                 DB_AUTO_COMMIT;     // allow auto-commit    
     290                DB_AUTO_COMMIT;     // allow auto-commit 
    291291            db = new Db (this->db_env, 0); 
    292292            db->open (NULL,             // Txn pointer 
     
    302302        return "done"; 
    303303    } 
    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 
    305305    // handles across all of the threads first... 
    306306    return ""; 
     
    336336    if (!db) 
    337337    { 
    338         u_int32_t db_flags = DB_AUTO_COMMIT; // allow auto-commit    
     338        u_int32_t db_flags = DB_AUTO_COMMIT; // allow auto-commit 
    339339 
    340340        db = new Db (this->db_env, 0);