Changeset 30415

Show
Ignore:
Timestamp:
02/21/08 20:06:22 (9 months ago)
Author:
tdelprat
Message:

NXP-2107

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-core/src/main/java/org/nuxeo/ecm/core/search/threading/IndexingThreadImpl.java

    r30393 r30415  
    152152 
    153153    @Override 
     154    public void interrupt() 
     155    { 
     156        closeSearchServiceSession(); 
     157        closeCoreSession(); 
     158        logout(); 
     159        super.interrupt(); 
     160    } 
     161 
     162    // NXP-2107 
     163    /*@Override 
    154164    protected void finalize() { 
    155165        closeSearchServiceSession(); 
    156166        closeCoreSession(); 
    157167        logout(); 
    158     } 
     168    }*/ 
    159169 
    160170    public SearchServiceSession getSearchServiceSession() throws Exception { 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-core/src/main/java/org/nuxeo/ecm/core/search/threading/IndexingThreadPool.java

    r29867 r30415  
    4848    private static final Log log = LogFactory.getLog(IndexingThreadPool.class); 
    4949 
    50     private static int MAX_POOL_SIZE = 5; 
     50    private static int MAX_POOL_SIZE = 10; 
     51 
     52    private static int MIN_POOL_SIZE = 5; 
    5153 
    5254    // Here, idle threads waiting for work if IndexingTask pool is full, will 
     
    6870        log.info("Indexing thread pool will be initialized with a size pool @ " 
    6971                + MAX_POOL_SIZE); 
    70         tpExec = new ThreadPoolExecutor(MAX_POOL_SIZE, MAX_POOL_SIZE, 
     72        tpExec = new ThreadPoolExecutor(MIN_POOL_SIZE, MAX_POOL_SIZE, 
    7173                THREAD_KEEP_ALIVE, TimeUnit.MILLISECONDS, 
    7274                new LinkedBlockingQueue<Runnable>(DEFAULT_QUEUE_SIZE), 
     
    121123        } 
    122124    } 
    123      
     125 
    124126    public static boolean isReindexing() { 
    125127        return reindexExec.getActiveCount() > 0; 
  • org.nuxeo.ecm.platform/branches/5.1/nuxeo-platform-search-core/src/main/java/org/nuxeo/ecm/core/search/threading/ReindexingAllTask.java

    r29867 r30415  
    11/** 
    2  *  
     2 * 
    33 */ 
    44package org.nuxeo.ecm.core.search.threading; 
     
    88import org.nuxeo.ecm.core.api.DocumentModel; 
    99import org.nuxeo.ecm.core.search.api.backend.indexing.resources.ResolvedResources; 
    10 import org.nuxeo.ecm.core.search.api.client.IndexingException; 
    1110 
    1211/** 
    1312 * @author <a href="mailto:ja@nuxeo.com">Julien Anguenot</a> 
    14  *  
     13 * 
    1514 */ 
    1615public class ReindexingAllTask extends IndexingTask { 
    1716 
    1817    private static final Log log = LogFactory.getLog(ReindexingAllTask.class); 
    19      
     18 
    2019    private static int DEFAULT_DOC_BATCH_SIZE = 50; 
    2120 
     
    2827        super(dm, recursive, fulltext); 
    2928    } 
    30      
     29 
    3130    // XXX deal with that. 
    3231    public ReindexingAllTask(ResolvedResources resources) { 
     
    4039        // Init search service. 
    4140        getSearchService(); 
    42          
     41 
    4342        final int current_batch_size = searchService.getIndexingDocBatchSize(); 
    44          
     43 
    4544        try { 
    4645 
     
    7170        } catch (InterruptedException e) { 
    7271            log.error(errorMsg, e); 
    73         //}  
     72        //} 
    7473        //catch (IndexingException e) { 
    7574        //r    log.error(errorMsg, e);