Merged V3.1 to HEAD

13175: Basic implementation of timestamp propagation
   13176: Fixed ETHREEOH-1172: NodeService.getProperties sometimes returning instance of "Collections.SingletonList"
   13184: Merged V3.0 to V3.1
      13179: Merged V2.2 to V3.0
         13141: Fix for ETWOTWO-1109: WCM - content publisher cannot submit modified assets (2.2.3-dev regress)
         13144: Fix for repopened ETWOTWO-1082:  AVM has concurrency limitations via CIFS/NFS/FTP ...
      13180: Merged V2.2 to V3.0
         13144: Fix for repopened ETWOTWO-1082:  AVM has concurrency limitations via CIFS/NFS/FTP ...
   13185: Logging enhancements to FileFolderService to aid debugging of ETHREEOH-1247
   13187: Changed NPE to IllegalArgumentException
   13191: Fix for ETHREEOH-1267 malformed JSON.
   13203: Fix ETHREEOH-1309 regress
   13205: Fixed typo of UNKNOWN
   13206: DM index check - allow index transaction tracker to be reset, etc
   13213: Fixed ETHREEOH-1313: System Property Overrides not working when using the installer
   13214: WCM services - add/update unit tests - CRUD using different roles
   ___________________________________________________________________
   Modified: svn:mergeinfo
      Merged /alfresco/BRANCHES/V3.0:r13179-13180
      Merged /alfresco/BRANCHES/V2.2:r13141,13144
      Merged /alfresco/BRANCHES/V3.1:r13172,13175-13176,13179-13181,13184-13189,13191,13203,13205-13206,13210-13215


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@13610 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2009-03-12 20:15:34 +00:00
parent 39bc2536d5
commit 07114a1ed2
21 changed files with 736 additions and 68 deletions

View File

@@ -36,6 +36,7 @@ import org.alfresco.error.AlfrescoRuntimeException;
import org.alfresco.repo.domain.Transaction;
import org.alfresco.repo.transaction.RetryingTransactionHelper;
import org.alfresco.repo.transaction.RetryingTransactionHelper.RetryingTransactionCallback;
import org.alfresco.util.ISO8601DateFormat;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
@@ -195,24 +196,12 @@ public class IndexTransactionTracker extends AbstractReindexComponent
}
};
public void reindexFromTxn(long txnId)
public void resetFromTxn(long txnId)
{
try
{
logger.info("reindexFromTxn: "+txnId);
logger.info("resetFromTxn: "+txnId);
this.fromTxnId = txnId;
this.started = false;
reindex();
this.started = false;
}
finally
{
this.fromTxnId = 0L;
}
this.fromTxnId = txnId;
this.started = false; // this will cause index tracker to break out (so that it can be re-started)
}
@Override
@@ -225,7 +214,7 @@ public class IndexTransactionTracker extends AbstractReindexComponent
RetryingTransactionHelper retryingTransactionHelper = transactionService.getRetryingTransactionHelper();
if ((!started) || (this.fromTxnId != 0L))
if (!started)
{
// Disable in-transaction indexing
if (disableInTransactionIndexing && nodeIndexer != null)
@@ -240,6 +229,8 @@ public class IndexTransactionTracker extends AbstractReindexComponent
if (this.fromTxnId != 0L)
{
logger.info("reindexImpl: start fromTxnId: "+fromTxnId+" "+this);
Long fromTxnCommitTime = getTxnCommitTime(this.fromTxnId);
if (fromTxnCommitTime == null)
@@ -254,12 +245,10 @@ public class IndexTransactionTracker extends AbstractReindexComponent
fromTimeInclusive = retryingTransactionHelper.doInTransaction(getStartingCommitTimeWork, true, true);
}
fromTxnId = 0L;
started = true;
if (logger.isDebugEnabled())
{
logger.debug("reindexImpl: fromTimeInclusive: "+fromTimeInclusive+" "+this);
}
logger.info("reindexImpl: start fromTimeInclusive: "+ISO8601DateFormat.format(new Date(fromTimeInclusive))+" "+this);
}
while (true)
@@ -274,9 +263,9 @@ public class IndexTransactionTracker extends AbstractReindexComponent
// Wait for the asynchronous reindexing to complete
waitForAsynchronousReindexing();
if (logger.isDebugEnabled())
if (logger.isTraceEnabled())
{
logger.debug("reindexImpl: completed: " + this);
logger.trace("reindexImpl: completed: "+this);
}
statusMsg = NO_REINDEX;
@@ -383,9 +372,9 @@ public class IndexTransactionTracker extends AbstractReindexComponent
previousTxnIds.add(txn.getId());
}
if (isShuttingDown())
if (isShuttingDown() || (! started))
{
// break out if the VM is shutting down
// break out if the VM is shutting down or tracker has been reset (ie. !started)
return false;
}
else
@@ -644,8 +633,9 @@ found:
}
}
if (isShuttingDown())
if (isShuttingDown() || (! started))
{
// break out if the VM is shutting down or tracker has been reset (ie. !started)
break;
}
// Flush the reindex buffer, if it is full or if we are on the last transaction and there are no more