mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-24 17:32:48 +00:00
Merged V2.1 to HEAD
6950: Fix for forum issue (6111) when using xsl:include 6951: Partial fix for WCM-862 6952: Merged V1.4 to V2.1 6921: Reindex tracking refactoring. 6954: Merged V1.4 to V2.1 6927: Config and startup changes for index tracking git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@7369 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -51,6 +51,7 @@
|
||||
</property>
|
||||
<property name="postUpdateScriptPatches">
|
||||
<list>
|
||||
<ref bean="patch.db-V1.4-TxnCommitTimeIndex" />
|
||||
<ref bean="patch.db-V2.1-FKIndexes" />
|
||||
<ref bean="patch.db-V2.1-ExplicitIndexes" />
|
||||
<ref bean="patch.db-V2.1-JBPMData" />
|
||||
|
@@ -0,0 +1,18 @@
|
||||
--
|
||||
-- Explicit index for alf_transaction.commit_time_ms (Generic Schema 1.4)
|
||||
--
|
||||
|
||||
CREATE INDEX idx_commit_time_ms ON alf_transaction (commit_time_ms);
|
||||
UPDATE alf_transaction SET commit_time_ms = id WHERE commit_time_ms IS NULL;
|
||||
|
||||
--
|
||||
-- Record script finish
|
||||
--
|
||||
delete from alf_applied_patch where id = 'patch.db-V1.4-TxnCommitTimeIndex';
|
||||
insert into alf_applied_patch
|
||||
(id, description, fixes_from_schema, fixes_to_schema, applied_to_schema, target_schema, applied_on_date, applied_to_server, was_executed, succeeded, report)
|
||||
values
|
||||
(
|
||||
'patch.db-V1.4-TxnCommitTimeIndex', 'Executed script AlfrescoSchemaUpdate-1.4-TxnCommitTimeIndex.sql',
|
||||
0, 75, -1, 76, null, 'UNKOWN', 1, 1, 'Script completed'
|
||||
);
|
@@ -15,6 +15,11 @@
|
||||
#db.pool.initial=10
|
||||
#db.pool.max=100
|
||||
|
||||
#
|
||||
# Sample index tracking frequency
|
||||
#
|
||||
#index.tracking.cronExpression=0/5 * * * * ?
|
||||
|
||||
#
|
||||
# Property to control whether schema updates are performed automatically.
|
||||
# Updates must be enabled during upgrades as, apart from the static upgrade scripts,
|
||||
|
@@ -1,83 +1,4 @@
|
||||
<?xml version='1.0' encoding='UTF-8'?>
|
||||
<!DOCTYPE beans PUBLIC '-//SPRING//DTD BEAN//EN' 'http://www.springframework.org/dtd/spring-beans.dtd'>
|
||||
|
||||
<beans>
|
||||
Index tracking is now controlled using core properties.
|
||||
See 'alfresco/repository.properties' and 'alfresco/extension/custom-repository.properties.sample'.
|
||||
|
||||
<!--===========================-->
|
||||
<!-- ADM index tracking -->
|
||||
<!--===========================-->
|
||||
|
||||
<!-- Schedule index tracking for ADM every 10s -->
|
||||
<bean id="admIndexTrackerTrigger" class="org.alfresco.util.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<bean class="org.springframework.scheduling.quartz.JobDetailBean">
|
||||
<property name="jobClass">
|
||||
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
|
||||
</property>
|
||||
<property name="jobDataAsMap">
|
||||
<map>
|
||||
<entry key="indexRecoveryComponent">
|
||||
<ref bean="admIndexTrackerComponent" />
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="scheduler">
|
||||
<ref bean="schedulerFactory" />
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>0,10,20,30,40,50 * * * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean
|
||||
id="admIndexTrackerComponent"
|
||||
class="org.alfresco.repo.node.index.IndexRemoteTransactionTracker"
|
||||
parent="indexRecoveryComponentBase">
|
||||
<property name="remoteOnly">
|
||||
<value>true</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!--===========================-->
|
||||
<!-- AVM (WCM) index tracking -->
|
||||
<!--===========================-->
|
||||
|
||||
<!-- Schedule index tracking for AVM every 60s -->
|
||||
<bean id="indexTrackerTrigger" class="org.alfresco.util.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<bean class="org.springframework.scheduling.quartz.JobDetailBean">
|
||||
<property name="jobClass">
|
||||
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
|
||||
</property>
|
||||
<property name="jobDataAsMap">
|
||||
<map>
|
||||
<entry key="indexRecoveryComponent">
|
||||
<ref bean="avmIndexTrackerComponent" />
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="scheduler">
|
||||
<ref bean="schedulerFactory" />
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>15 * * * * ?</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean
|
||||
id="avmIndexTrackerComponent"
|
||||
class="org.alfresco.repo.node.index.AVMRemoteSnapshotTracker"
|
||||
parent="indexRecoveryComponentBase">
|
||||
<property name="avmService">
|
||||
<ref bean="avmService" />
|
||||
</property>
|
||||
<property name="avmSnapShotTriggeredIndexingMethodInterceptor">
|
||||
<ref bean="avmSnapShotTriggeredIndexingMethodInterceptor" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -28,19 +28,18 @@
|
||||
</bean>
|
||||
|
||||
<!-- index recovery and validation -->
|
||||
<!--
|
||||
Recovery types are:
|
||||
NONE: Ignore
|
||||
VALIDATE: Checks that the last transaction for each store is represented in the indexes
|
||||
AUTO: Validates and auto-recovers if validation fails
|
||||
FULL: Full index rebuild, processing all transactions in order. The server is temporarily suspended.
|
||||
-->
|
||||
<bean
|
||||
id="indexRecoveryComponent"
|
||||
class="org.alfresco.repo.node.index.FullIndexRecoveryComponent"
|
||||
parent="indexRecoveryComponentBase">
|
||||
<property name="recoveryMode">
|
||||
<value>${index.recovery.mode}</value>
|
||||
<value>${index.recovery.mode}</value>
|
||||
</property>
|
||||
<property name="stopOnError">
|
||||
<value>${index.recovery.stopOnError}</value>
|
||||
</property>
|
||||
<property name="indexTracker">
|
||||
<ref bean="admIndexTrackerComponent" />
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
@@ -60,6 +59,50 @@
|
||||
</bean>
|
||||
|
||||
|
||||
<!-- Index tracking -->
|
||||
<!--
|
||||
This is the default index tracker component. It is used during bootstrap when incremental recovery
|
||||
is required. It is also used, by default in the clustered index tracking sample.
|
||||
-->
|
||||
<bean
|
||||
id="admIndexTrackerComponent"
|
||||
class="org.alfresco.repo.node.index.IndexTransactionTracker"
|
||||
parent="indexRecoveryComponentBase">
|
||||
<property name="maxTxnDurationMinutes">
|
||||
<value>${index.tracking.maxTxnDurationMinutes}</value>
|
||||
</property>
|
||||
<property name="reindexLagMs">
|
||||
<value>${index.tracking.reindexLagMs}</value>
|
||||
</property>
|
||||
<property name="maxRecordSetSize">
|
||||
<value>${index.tracking.maxRecordSetSize}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Schedule index tracking for ADM -->
|
||||
<bean id="admIndexTrackerTrigger" class="org.alfresco.util.CronTriggerBean">
|
||||
<property name="jobDetail">
|
||||
<bean class="org.springframework.scheduling.quartz.JobDetailBean">
|
||||
<property name="jobClass">
|
||||
<value>org.alfresco.repo.node.index.IndexRecoveryJob</value>
|
||||
</property>
|
||||
<property name="jobDataAsMap">
|
||||
<map>
|
||||
<entry key="indexRecoveryComponent">
|
||||
<ref bean="admIndexTrackerComponent" />
|
||||
</entry>
|
||||
</map>
|
||||
</property>
|
||||
</bean>
|
||||
</property>
|
||||
<property name="scheduler">
|
||||
<ref bean="schedulerFactory" />
|
||||
</property>
|
||||
<property name="cronExpression">
|
||||
<value>${index.tracking.cronExpression}</value>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- Bean that attempts to index content that was previously missing -->
|
||||
<bean
|
||||
id="missingContentReindexComponent"
|
||||
|
@@ -1077,4 +1077,21 @@
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<bean id="patch.db-V1.4-TxnCommitTimeIndex" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||
<property name="id"><value>patch.db-V1.4-TxnCommitTimeIndex</value></property>
|
||||
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||
<property name="fixesFromSchema"><value>0</value></property>
|
||||
<property name="fixesToSchema"><value>110</value></property>
|
||||
<property name="targetSchema"><value>111</value></property>
|
||||
<property name="scriptUrl">
|
||||
<value>classpath:alfresco/dbscripts/upgrade/1.4/${db.script.dialect}/AlfrescoSchemaUpdate-1.4-TxnCommitTimeIndex.sql</value>
|
||||
</property>
|
||||
<!-- dependent on upgrade script 1.4-2 having being run -->
|
||||
<property name="dependsOn" >
|
||||
<list>
|
||||
<ref bean="patch.schemaUpdateScript-V1.4-2" />
|
||||
</list>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
</beans>
|
||||
|
@@ -13,8 +13,29 @@ dir.indexes=${dir.root}/lucene-indexes
|
||||
# The location for lucene index locks
|
||||
dir.indexes.lock=${dir.indexes}/locks
|
||||
|
||||
# The index recovery mode (NONE, VALIDATE, AUTO, FULL)
|
||||
# ######################################### #
|
||||
# Index Recovery and Tracking Configuration #
|
||||
# ######################################### #
|
||||
#
|
||||
# Recovery types are:
|
||||
# NONE: Ignore
|
||||
# VALIDATE: Checks that the first and last transaction for each store is represented in the indexes
|
||||
# AUTO: Validates and auto-recovers if validation fails
|
||||
# FULL: Full index rebuild, processing all transactions in order. The server is temporarily suspended.
|
||||
index.recovery.mode=VALIDATE
|
||||
# Force FULL recovery to stop when encountering errors
|
||||
index.recovery.stopOnError=true
|
||||
# Set the frequency with which the index tracking is triggered.
|
||||
# By default, this is effectively never, but can be modified as required.
|
||||
# Examples:
|
||||
# Once every five seconds: 0/5 * * * * ?
|
||||
# Once every two seconds : 0/2 * * * * ?
|
||||
# See http://quartz.sourceforge.net/javadoc/org/quartz/CronTrigger.html
|
||||
index.tracking.cronExpression=* * * * * ? 2099
|
||||
# Other properties.
|
||||
index.tracking.maxTxnDurationMinutes=60
|
||||
index.tracking.reindexLagMs=50
|
||||
index.tracking.maxRecordSetSize=1000
|
||||
|
||||
# Change the failure behaviour of the configuration checker
|
||||
system.bootstrap.config_check.strict=true
|
||||
|
@@ -19,4 +19,4 @@ version.build=@build-number@
|
||||
|
||||
# Schema number
|
||||
|
||||
version.schema=110
|
||||
version.schema=111
|
||||
|
Reference in New Issue
Block a user