mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-07 17:49:17 +00:00
Merged V3.2 to HEAD
16714: WCM/AVM fixes - ETHREEOH-2697 & ETHREEOH-1847 16802: Merged V3.1 to V3.2 16801: AVMTestSuite - add couple of missing unit tests 16810: WCM locking - minor improvement to include lock owner (when trying to "grabLock") git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@16925 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -1,3 +1,27 @@
|
||||
/*
|
||||
* Copyright (C) 2005-2009 Alfresco Software Limited.
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* as published by the Free Software Foundation; either version 2
|
||||
* of the License, or (at your option) any later version.
|
||||
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
||||
|
||||
* As a special exception to the terms and conditions of version 2.0 of
|
||||
* the GPL, you may redistribute this Program in connection with Free/Libre
|
||||
* and Open Source Software ("FLOSS") applications as described in Alfresco's
|
||||
* FLOSS exception. You should have recieved a copy of the text describing
|
||||
* the FLOSS exception, and it is also available here:
|
||||
* http://www.alfresco.com/legal/licensing"
|
||||
*/
|
||||
package org.alfresco.repo.node.index;
|
||||
|
||||
import java.util.LinkedHashMap;
|
||||
@@ -199,16 +223,7 @@ public class AVMFullIndexRecoveryComponent extends AbstractReindexComponent
|
||||
// Nothing to do for unindexed stores
|
||||
if (avmSnapShotTriggeredIndexingMethodInterceptor.getIndexMode(store) == IndexMode.UNINDEXED)
|
||||
{
|
||||
|
||||
if (!avmSnapShotTriggeredIndexingMethodInterceptor.hasIndexBeenCreated(store))
|
||||
{
|
||||
logger.warn(" Index for avm store " + store + " is out of date");
|
||||
return recoveryMode;
|
||||
}
|
||||
else
|
||||
{
|
||||
return RecoveryMode.NONE;
|
||||
}
|
||||
return RecoveryMode.NONE;
|
||||
}
|
||||
|
||||
if (recoveryMode == RecoveryMode.FULL) // no validate required
|
||||
@@ -268,22 +283,23 @@ public class AVMFullIndexRecoveryComponent extends AbstractReindexComponent
|
||||
|
||||
private void recoverStore(final String store, final RecoveryMode mode)
|
||||
{
|
||||
if (mode == RecoveryMode.AUTO)
|
||||
{
|
||||
logger.info(" Auto recovering index for " + store);
|
||||
}
|
||||
else if (mode == RecoveryMode.FULL)
|
||||
{
|
||||
logger.info(" Rebuilding index for " + store);
|
||||
}
|
||||
|
||||
if (!avmSnapShotTriggeredIndexingMethodInterceptor.hasIndexBeenCreated(store))
|
||||
{
|
||||
avmSnapShotTriggeredIndexingMethodInterceptor.createIndex(store);
|
||||
}
|
||||
|
||||
if (avmSnapShotTriggeredIndexingMethodInterceptor.getIndexMode(store) != IndexMode.UNINDEXED)
|
||||
IndexMode storeIndexMode = avmSnapShotTriggeredIndexingMethodInterceptor.getIndexMode(store);
|
||||
if (storeIndexMode != IndexMode.UNINDEXED)
|
||||
{
|
||||
if (mode == RecoveryMode.AUTO)
|
||||
{
|
||||
logger.info(" Auto recovering index for " + store);
|
||||
}
|
||||
else if (mode == RecoveryMode.FULL)
|
||||
{
|
||||
logger.info(" Rebuilding index for " + store);
|
||||
}
|
||||
|
||||
if (!avmSnapShotTriggeredIndexingMethodInterceptor.hasIndexBeenCreated(store))
|
||||
{
|
||||
avmSnapShotTriggeredIndexingMethodInterceptor.createIndex(store);
|
||||
}
|
||||
|
||||
final int latest = avmService.getLatestSnapshotID(store);
|
||||
if (latest <= 0)
|
||||
{
|
||||
@@ -313,12 +329,18 @@ public class AVMFullIndexRecoveryComponent extends AbstractReindexComponent
|
||||
}
|
||||
};
|
||||
transactionService.getRetryingTransactionHelper().doInTransaction(reindexWork, true, true);
|
||||
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" Index updated for " + store + "("+storeIndexMode.toString()+")");
|
||||
}
|
||||
}
|
||||
|
||||
if (logger.isDebugEnabled())
|
||||
else
|
||||
{
|
||||
logger.debug(" Index updated for " + store);
|
||||
if (logger.isDebugEnabled())
|
||||
{
|
||||
logger.debug(" Index skipped for " + store+ "("+storeIndexMode.toString()+")");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user