mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Fix AVM and context issues
git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@5749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -38,6 +38,8 @@ import org.alfresco.service.cmr.repository.ContentService;
|
||||
import org.alfresco.service.cmr.repository.NodeService;
|
||||
import org.alfresco.service.cmr.repository.StoreRef;
|
||||
import org.alfresco.service.namespace.NamespaceService;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
/**
|
||||
* Factory for AVM indexers and searchers
|
||||
@@ -47,6 +49,8 @@ import org.alfresco.service.namespace.NamespaceService;
|
||||
*/
|
||||
public class AVMLuceneIndexerAndSearcherFactory extends AbstractLuceneIndexerAndSearcherFactory
|
||||
{
|
||||
private static Log s_logger = LogFactory.getLog(AVMLuceneIndexerAndSearcherFactory.class);
|
||||
|
||||
private DictionaryService dictionaryService;
|
||||
|
||||
private NamespaceService nameSpaceService;
|
||||
@@ -61,6 +65,11 @@ public class AVMLuceneIndexerAndSearcherFactory extends AbstractLuceneIndexerAnd
|
||||
|
||||
private ContentStore contentStore;
|
||||
|
||||
public AVMLuceneIndexerAndSearcherFactory()
|
||||
{
|
||||
s_logger.error("Creating AVMLuceneIndexerAndSearcherFactory");
|
||||
}
|
||||
|
||||
/**
|
||||
* Set the dictionary service
|
||||
* @param dictionaryService
|
||||
|
@@ -250,6 +250,10 @@ public class AVMLuceneIndexerImpl extends AbstractLuceneIndexerImpl<String> impl
|
||||
{
|
||||
return docs;
|
||||
}
|
||||
if (desc.isLayeredDirectory() || desc.isLayeredFile())
|
||||
{
|
||||
return docs;
|
||||
}
|
||||
|
||||
List<Pair<Integer, String>> paths = avmService.getHeadPaths(desc);
|
||||
if(paths.size() == 0)
|
||||
|
@@ -83,18 +83,18 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
|
||||
* indexer for each store within a transaction
|
||||
*/
|
||||
|
||||
private static Map<Xid, Map<StoreRef, LuceneIndexer>> activeIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||
private Map<Xid, Map<StoreRef, LuceneIndexer>> activeIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||
|
||||
/**
|
||||
* Suspended global transactions.
|
||||
*/
|
||||
private static Map<Xid, Map<StoreRef, LuceneIndexer>> suspendedIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||
private Map<Xid, Map<StoreRef, LuceneIndexer>> suspendedIndexersInGlobalTx = new HashMap<Xid, Map<StoreRef, LuceneIndexer>>();
|
||||
|
||||
/**
|
||||
* Thread local indexers - used outside a global transaction
|
||||
*/
|
||||
|
||||
private static ThreadLocal<Map<StoreRef, LuceneIndexer>> threadLocalIndexers = new ThreadLocal<Map<StoreRef, LuceneIndexer>>();
|
||||
private ThreadLocal<Map<StoreRef, LuceneIndexer>> threadLocalIndexers = new ThreadLocal<Map<StoreRef, LuceneIndexer>>();
|
||||
|
||||
/**
|
||||
* The dafault timeout for transactions TODO: Respect this
|
||||
@@ -311,7 +311,7 @@ public abstract class AbstractLuceneIndexerAndSearcherFactory implements LuceneI
|
||||
* @param tx
|
||||
* @return - the transaction id
|
||||
*/
|
||||
private static String getTransactionId(Transaction tx, StoreRef storeRef)
|
||||
private String getTransactionId(Transaction tx, StoreRef storeRef)
|
||||
{
|
||||
if (tx instanceof SimpleTransaction)
|
||||
{
|
||||
|
@@ -1442,7 +1442,7 @@ public class IndexInfo
|
||||
{
|
||||
public void beforeWithReadLock(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||
{
|
||||
|
||||
closeDelta(id);
|
||||
}
|
||||
|
||||
public void transition(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||
|
@@ -80,6 +80,11 @@
|
||||
<property name="usr:members">
|
||||
<type>d:text</type>
|
||||
<multiple>true</multiple>
|
||||
<index enabled="true">
|
||||
<atomic>true</atomic>
|
||||
<stored>false</stored>
|
||||
<tokenised>false</tokenised>
|
||||
</index>
|
||||
</property>
|
||||
</properties>
|
||||
<associations>
|
||||
|
Reference in New Issue
Block a user