mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-07-31 17:39:05 +00:00
Merged HEAD-BUG-FIX to HEAD (4.2.0) (MNT-9523)
54873: Merged V4.1-BUG-FIX (4.1.N) to HEAD-BUG-FIX (4.2.0): 54573: Merged PATCHES/V4.1.6 to V4.1-BUG-FIX (4.1.7) 54530: Merged PATCHES/V4.1.3 (4.1.3.11) to PATCHES/V4.1.6 (4.1.6) (MNT-9522) 53984: Merged DEV to PATCHES/V4.1.3 (4.1.3.10) 53849: MNT-9053 : Alfresco site listings cause high CPU usage on database server Created a patch to create new index in MySQL and drop the old one. 53955: MNT-9053 : Alfresco site listings cause high CPU usage on database server Added the patches for the rest of the supported DBs. 54105: MNT-9053 : Alfresco site listings cause high CPU usage on database server Corrected the create scripts and schema reference files. Note: Removed redundant generic script, incremented versions for patches, etc 54531: Removed accidental commit in rev 54530 (MNT-9522) Note: Incremented schema number and patch git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@54877 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -247,7 +247,7 @@ CREATE TABLE alf_child_assoc
|
|||||||
assoc_index INTEGER,
|
assoc_index INTEGER,
|
||||||
PRIMARY KEY (id),
|
PRIMARY KEY (id),
|
||||||
UNIQUE KEY parent_node_id (parent_node_id, type_qname_id, child_node_name_crc, child_node_name),
|
UNIQUE KEY parent_node_id (parent_node_id, type_qname_id, child_node_name_crc, child_node_name),
|
||||||
KEY fk_alf_cass_pnode (parent_node_id),
|
KEY idx_alf_cass_pnode (parent_node_id, assoc_index, id),
|
||||||
KEY fk_alf_cass_cnode (child_node_id),
|
KEY fk_alf_cass_cnode (child_node_id),
|
||||||
KEY fk_alf_cass_tqn (type_qname_id),
|
KEY fk_alf_cass_tqn (type_qname_id),
|
||||||
KEY fk_alf_cass_qnns (qname_ns_id),
|
KEY fk_alf_cass_qnns (qname_ns_id),
|
||||||
|
@@ -966,9 +966,11 @@
|
|||||||
<columnname>child_node_name</columnname>
|
<columnname>child_node_name</columnname>
|
||||||
</columnnames>
|
</columnnames>
|
||||||
</index>
|
</index>
|
||||||
<index name="fk_alf_cass_pnode" unique="false">
|
<index name="idx_alf_cass_pnode" unique="false">
|
||||||
<columnnames>
|
<columnnames>
|
||||||
<columnname>parent_node_id</columnname>
|
<columnname>parent_node_id</columnname>
|
||||||
|
<columnname>assoc_index</columnname>
|
||||||
|
<columnname>id</columnname>
|
||||||
</columnnames>
|
</columnnames>
|
||||||
</index>
|
</index>
|
||||||
<index name="fk_alf_cass_cnode" unique="false">
|
<index name="fk_alf_cass_cnode" unique="false">
|
||||||
|
@@ -269,7 +269,7 @@ CREATE TABLE alf_child_assoc
|
|||||||
CONSTRAINT fk_alf_cass_tqn FOREIGN KEY (type_qname_id) REFERENCES alf_qname (id)
|
CONSTRAINT fk_alf_cass_tqn FOREIGN KEY (type_qname_id) REFERENCES alf_qname (id)
|
||||||
);
|
);
|
||||||
CREATE UNIQUE INDEX parent_node_id ON alf_child_assoc (parent_node_id, type_qname_id, child_node_name_crc, child_node_name);
|
CREATE UNIQUE INDEX parent_node_id ON alf_child_assoc (parent_node_id, type_qname_id, child_node_name_crc, child_node_name);
|
||||||
CREATE INDEX fk_alf_cass_pnode ON alf_child_assoc (parent_node_id);
|
CREATE INDEX idx_alf_cass_pnode ON alf_child_assoc (parent_node_id, assoc_index, id);
|
||||||
CREATE INDEX fk_alf_cass_cnode ON alf_child_assoc (child_node_id);
|
CREATE INDEX fk_alf_cass_cnode ON alf_child_assoc (child_node_id);
|
||||||
CREATE INDEX fk_alf_cass_tqn ON alf_child_assoc (type_qname_id);
|
CREATE INDEX fk_alf_cass_tqn ON alf_child_assoc (type_qname_id);
|
||||||
CREATE INDEX fk_alf_cass_qnns ON alf_child_assoc (qname_ns_id);
|
CREATE INDEX fk_alf_cass_qnns ON alf_child_assoc (qname_ns_id);
|
||||||
|
@@ -1008,9 +1008,11 @@
|
|||||||
<columnname>child_node_id</columnname>
|
<columnname>child_node_id</columnname>
|
||||||
</columnnames>
|
</columnnames>
|
||||||
</index>
|
</index>
|
||||||
<index name="fk_alf_cass_pnode" unique="false">
|
<index name="idx_alf_cass_pnode" unique="false">
|
||||||
<columnnames>
|
<columnnames>
|
||||||
<columnname>parent_node_id</columnname>
|
<columnname>parent_node_id</columnname>
|
||||||
|
<columnname>assoc_index</columnname>
|
||||||
|
<columnname>id</columnname>
|
||||||
</columnnames>
|
</columnnames>
|
||||||
</index>
|
</index>
|
||||||
<index name="fk_alf_cass_qnns" unique="false">
|
<index name="fk_alf_cass_qnns" unique="false">
|
||||||
|
@@ -90,7 +90,8 @@
|
|||||||
<ref bean="patch.db-V4.2-remove-index-acl_id" />
|
<ref bean="patch.db-V4.2-remove-index-acl_id" />
|
||||||
<ref bean="patch.db-V4.1-drop-activiti-feed-format" />
|
<ref bean="patch.db-V4.1-drop-activiti-feed-format" />
|
||||||
<ref bean="patch.db-V4.2-metadata-query-indexes" />
|
<ref bean="patch.db-V4.2-metadata-query-indexes" />
|
||||||
<ref bean="patch.db-V4.1-fix-Repo-seqs-order" />
|
<ref bean="patch.db-V4.1-fix-Repo-seqs-order" />
|
||||||
|
<ref bean="patch.db-V4.1-ChildAssoc-OrderBy" />
|
||||||
</list>
|
</list>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
@@ -0,0 +1,24 @@
|
|||||||
|
--
|
||||||
|
-- Title: Add new index to alf_child_assoc
|
||||||
|
-- Database: MySQL
|
||||||
|
-- Since: V4.1 Schema 5123
|
||||||
|
-- Author: Alex Mukha
|
||||||
|
--
|
||||||
|
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||||
|
--
|
||||||
|
-- MNT-9053 : Alfresco site listings cause high CPU usage on database server
|
||||||
|
|
||||||
|
DROP INDEX fk_alf_cass_pnode ON alf_child_assoc;
|
||||||
|
CREATE INDEX idx_alf_cass_pnode ON alf_child_assoc (parent_node_id, assoc_index, id);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Record script finish
|
||||||
|
--
|
||||||
|
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V4.1-ChildAssoc-OrderBy';
|
||||||
|
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-V4.1-ChildAssoc-OrderBy', 'MNT-9053 : Alfresco site listings cause high CPU usage on database server',
|
||||||
|
0, 6032, -1, 6033, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||||
|
);
|
@@ -0,0 +1,24 @@
|
|||||||
|
--
|
||||||
|
-- Title: Add new index to alf_child_assoc
|
||||||
|
-- Database: PostgreSQL
|
||||||
|
-- Since: V4.1 Schema 5123
|
||||||
|
-- Author: Alex Mukha
|
||||||
|
--
|
||||||
|
-- Please contact support@alfresco.com if you need assistance with the upgrade.
|
||||||
|
--
|
||||||
|
-- MNT-9053 : Alfresco site listings cause high CPU usage on database server
|
||||||
|
|
||||||
|
DROP INDEX fk_alf_cass_pnode;
|
||||||
|
CREATE INDEX idx_alf_cass_pnode ON alf_child_assoc (parent_node_id, assoc_index, id);
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Record script finish
|
||||||
|
--
|
||||||
|
DELETE FROM alf_applied_patch WHERE id = 'patch.db-V4.1-ChildAssoc-OrderBy';
|
||||||
|
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-V4.1-ChildAssoc-OrderBy', 'MNT-9053 : Alfresco site listings cause high CPU usage on database server',
|
||||||
|
0, 6032, -1, 6033, null, 'UNKNOWN', ${TRUE}, ${TRUE}, 'Script completed'
|
||||||
|
);
|
@@ -3424,7 +3424,7 @@
|
|||||||
<value>classpath:alfresco/dbscripts/upgrade/4.1/${db.script.dialect}/rename-constraint-activiti.sql</value>
|
<value>classpath:alfresco/dbscripts/upgrade/4.1/${db.script.dialect}/rename-constraint-activiti.sql</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
|
||||||
<bean id="patch.db-V4.2-add-activti-index-historic-activity" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
<bean id="patch.db-V4.2-add-activti-index-historic-activity" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||||
<property name="id" value="patch.db-V4.2-add-activti-index-historic-activity" />
|
<property name="id" value="patch.db-V4.2-add-activti-index-historic-activity" />
|
||||||
<property name="description" value="patch.addActivtiIndexHistoricActivity.description" />
|
<property name="description" value="patch.addActivtiIndexHistoricActivity.description" />
|
||||||
@@ -3630,4 +3630,15 @@
|
|||||||
<value>classpath:alfresco/dbscripts/upgrade/4.2/${db.script.dialect}/drop-AVM-index.sql</value>
|
<value>classpath:alfresco/dbscripts/upgrade/4.2/${db.script.dialect}/drop-AVM-index.sql</value>
|
||||||
</property>
|
</property>
|
||||||
</bean>
|
</bean>
|
||||||
|
<bean id="patch.db-V4.1-ChildAssoc-OrderBy" class="org.alfresco.repo.admin.patch.impl.SchemaUpgradeScriptPatch" parent="basePatch">
|
||||||
|
<property name="id"><value>patch.db-V4.1-ChildAssoc-OrderBy</value></property>
|
||||||
|
<property name="description"><value>patch.schemaUpgradeScript.description</value></property>
|
||||||
|
<property name="fixesFromSchema"><value>0</value></property>
|
||||||
|
<property name="fixesToSchema"><value>6032</value></property>
|
||||||
|
<property name="targetSchema"><value>6033</value></property>
|
||||||
|
<property name="scriptUrl">
|
||||||
|
<value>classpath:alfresco/dbscripts/upgrade/4.1/${db.script.dialect}/ChildAssoc-OrderBy.sql</value>
|
||||||
|
</property>
|
||||||
|
</bean>
|
||||||
|
|
||||||
</beans>
|
</beans>
|
||||||
|
@@ -23,4 +23,4 @@ version.build=r@scm-revision@-b@build-number@
|
|||||||
|
|
||||||
# Schema number
|
# Schema number
|
||||||
|
|
||||||
version.schema=6032
|
version.schema=6033
|
||||||
|
Reference in New Issue
Block a user