mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.1 to HEAD
6636: Temporary hack to fix build. 6637: Better handling of binary string bufs, disable link validation when poll interval is <= 0 6638: Forgotten files for TXT to PDF transformer. 6639: Fix for AWC-1541 6641: Fix for WCM-792. 6642: A little extra PropertyValue support for createNode, too. 6643: Fix for WCM-791 6644: Closure of AR-1528: Check concurrency handling of DuplicateChildNodeNameException 6647: Fix WCM-794 6648: WCM-656 6650: Applied user supplied patch to fix AWC-1546 - Cannot mount AVM using CIFS on new alfresco installation. 6651: Index tidy ups 6654: Various minor updates for passthru authentication debugging and error handling. 6657: Fix for WCM-799 (Some items selected for submission were not present) 6659: Updated installers. 6660: Partial fix to AWC-1524 6661: Fix WCM-803 6664: Including hibernate-3.2.1.jar in $VIRTUAL_TOMCAT_HOME/server/lib/ 6665: adding an automated unit test for output path patterns. 6668: Fixed to add shale-test-1.0.4.jar to Eclipse classpath (PHH oked) 6681: Fixes WCM-811 - Lookup.getIndirectionPath() had a bit of a howler in it. 6684: UncategorizedSQLException with the word 'deadlock' in the message is now cause for retrying a transaction. 6691: Fix for WCM-813 (lock not removed when expiration date set and no workflow on web project) 6696: Imporved SSO filters for SiteMinder etc + test filter 6697: Support for scheduled import 6699: Fix for the compliation target: compile-benchmarkframework 6701: Fix for 1.6 JVMs (1.5 gets by with lucky ordering) git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@6749 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1360,7 +1360,14 @@ public class IndexInfo
|
||||
// Do the deletions
|
||||
if ((entry.getDocumentCount() + entry.getDeletions()) == 0)
|
||||
{
|
||||
registerReferenceCountingIndexReader(id, tl.get());
|
||||
indexEntries.remove(id);
|
||||
if (s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("Removed commit with no new docs and no deletions");
|
||||
}
|
||||
clearOldReaders();
|
||||
cleaner.schedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1429,9 +1436,12 @@ public class IndexInfo
|
||||
|
||||
private class RolledBackTransition implements Transition
|
||||
{
|
||||
ThreadLocal<IndexReader> tl = new ThreadLocal<IndexReader>();
|
||||
|
||||
public void beforeWithReadLock(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||
{
|
||||
closeDelta(id);
|
||||
tl.set(buildReferenceCountingIndexReader(id));
|
||||
}
|
||||
|
||||
public void transition(String id, Set<Term> toDelete, Set<Term> read) throws IOException
|
||||
@@ -1446,6 +1456,15 @@ public class IndexInfo
|
||||
{
|
||||
entry.setStatus(TransactionStatus.ROLLEDBACK);
|
||||
writeStatus();
|
||||
|
||||
registerReferenceCountingIndexReader(id, tl.get());
|
||||
indexEntries.remove(id);
|
||||
if (s_logger.isDebugEnabled())
|
||||
{
|
||||
s_logger.debug("Removed rollback");
|
||||
}
|
||||
clearOldReaders();
|
||||
cleaner.schedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -1477,9 +1496,9 @@ public class IndexInfo
|
||||
if (TransactionStatus.DELETABLE.follows(entry.getStatus()))
|
||||
{
|
||||
indexEntries.remove(id);
|
||||
cleaner.schedule();
|
||||
writeStatus();
|
||||
clearOldReaders();
|
||||
cleaner.schedule();
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -2094,62 +2113,34 @@ public class IndexInfo
|
||||
|
||||
String indexLocation = args[0];
|
||||
IndexInfo ii = new IndexInfo(new File(indexLocation), null);
|
||||
while (true)
|
||||
|
||||
ii.readWriteLock.writeLock().lock();
|
||||
try
|
||||
{
|
||||
ii.readWriteLock.writeLock().lock();
|
||||
try
|
||||
System.out.println("Entry List for " + indexLocation);
|
||||
System.out.println(" Size = " + ii.indexEntries.size());
|
||||
int i = 0;
|
||||
for (IndexEntry entry : ii.indexEntries.values())
|
||||
{
|
||||
System.out.println("Entry List for " + indexLocation);
|
||||
System.out.println(" Size = " + ii.indexEntries.size());
|
||||
int i = 0;
|
||||
for (IndexEntry entry : ii.indexEntries.values())
|
||||
{
|
||||
System.out.println("\t" + (i++) + "\t" + entry.toString());
|
||||
}
|
||||
System.out.println("\t" + (i++) + "\t" + entry.toString());
|
||||
}
|
||||
finally
|
||||
{
|
||||
ii.releaseWriteLock();
|
||||
}
|
||||
IndexReader reader = ii.getMainIndexReferenceCountingReadOnlyIndexReader();
|
||||
TermEnum terms = reader.terms(new Term("@{archiweb.model}instance", ""));
|
||||
while (terms.next() && terms.term().field().equals("@{archiweb.model}instance"))
|
||||
{
|
||||
System.out.println("F = " + terms.term().field() + " V = " + terms.term().text() + " F = " + terms.docFreq());
|
||||
}
|
||||
terms.close();
|
||||
long start = System.currentTimeMillis();
|
||||
TermDocs termDocs = reader.termDocs(new Term("@{archiweb.model}instance", "tfl"));
|
||||
while (termDocs.next())
|
||||
{
|
||||
// System.out.println("Doc = " + termDocs.doc());
|
||||
Document doc = reader.document(termDocs.doc());
|
||||
doc.getField("ID");
|
||||
// System.out.println("Ref = "+doc.getField("ID"));
|
||||
}
|
||||
termDocs.close();
|
||||
System.out.println("Time = " + ((System.currentTimeMillis() - start) / 1000.0f));
|
||||
|
||||
terms = reader.terms(new Term("TYPE", ""));
|
||||
while (terms.next() && terms.term().field().equals("TYPE"))
|
||||
{
|
||||
System.out.println("F = " + terms.term().field() + " V = " + terms.term().text() + " F = " + terms.docFreq());
|
||||
}
|
||||
terms.close();
|
||||
start = System.currentTimeMillis();
|
||||
termDocs = reader.termDocs(new Term("TYPE", "{archiweb.model}tfdoc"));
|
||||
while (termDocs.next())
|
||||
{
|
||||
// System.out.println("Doc = " + termDocs.doc());
|
||||
Document doc = reader.document(termDocs.doc());
|
||||
doc.getField("ID");
|
||||
// System.out.println("Ref = "+doc.getField("ID"));
|
||||
}
|
||||
termDocs.close();
|
||||
System.out.println("Time = " + ((System.currentTimeMillis() - start) / 1000.0f));
|
||||
|
||||
// +@\{archiweb.model\}instance:TFL*
|
||||
}
|
||||
finally
|
||||
{
|
||||
ii.releaseWriteLock();
|
||||
}
|
||||
IndexReader reader = ii.getMainIndexReferenceCountingReadOnlyIndexReader();
|
||||
TermEnum terms = reader.terms(new Term("@{http://www.alfresco.org/model/user/1.0}members", ""));
|
||||
while (terms.next() && terms.term().field().equals("@{http://www.alfresco.org/model/user/1.0}members"))
|
||||
{
|
||||
System.out.println("F = " + terms.term().field() + " V = " + terms.term().text() + " F = " + terms.docFreq());
|
||||
if (terms.term().text().equals("xirmsi"))
|
||||
{
|
||||
System.out.println("Matched");
|
||||
}
|
||||
}
|
||||
terms.close();
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
|
@@ -66,7 +66,7 @@ public class ReferenceCountingReadOnlyIndexReaderFactory
|
||||
builder
|
||||
.append("Id = "
|
||||
+ rc.getId() + " Invalid = " + rc.getReferenceCount() + " invalid = "
|
||||
+ rc.getInvalidForReuse());
|
||||
+ rc.getInvalidForReuse() + " closed="+rc.getClosed());
|
||||
return builder.toString();
|
||||
}
|
||||
|
||||
@@ -158,6 +158,11 @@ public class ReferenceCountingReadOnlyIndexReaderFactory
|
||||
return invalidForReuse;
|
||||
}
|
||||
|
||||
public synchronized boolean getClosed()
|
||||
{
|
||||
return closed;
|
||||
}
|
||||
|
||||
public synchronized void setInvalidForReuse() throws IOException
|
||||
{
|
||||
if(closed)
|
||||
|
Reference in New Issue
Block a user