Skip to content

Commit 2c3101a

Browse files
authored
WX-1676 Drop workflow store status index IX_WORKFLOW_STORE_ENTRY_WS (#7452)
1 parent 6c4db65 commit 2c3101a

File tree

4 files changed

+18
-2
lines changed

4 files changed

+18
-2
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ such as "PAPI error code 9", "no available zones", and/or "quota too low".
2121

2222
Resolved a hotspot in Cromwell to make the `size()` engine function perform much faster on file arrays. Common examples of file arrays could include globs or scatter-gather results. This enhancement applies only to WDL 1.0 and later, because that's when `size()` added [support for arrays](https://github.com/openwdl/wdl/blob/main/versions/1.0/SPEC.md#acceptable-compound-input-types).
2323

24+
### Database migration
25+
26+
The `IX_WORKFLOW_STORE_ENTRY_WS` index is removed from `WORKFLOW_STORE_ENTRY`.
27+
28+
The index had low cardinality and workflow pickup is faster without it. Migration time depends on workflow store size, but should be very fast for most installations. Terminal workflows are removed from the workflow store, so only running workflows contribute to the cost.
2429

2530
## 87 Release Notes
2631

database/migration/src/main/resources/changelog.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@
9090
<include file="changesets/enlarge_docker_hash_store_entry_id.xml" relativeToChangelogFile="true" />
9191
<include file="changesets/enlarge_workflow_store_entry_id.xml" relativeToChangelogFile="true" />
9292
<include file="changesets/enlarge_sub_workflow_store_entry_id.xml" relativeToChangelogFile="true" />
93+
<include file="changesets/workflow_store_drop_state_index.xml" relativeToChangelogFile="true" />
9394
<!-- WARNING!
9495
This changeset should always be last.
9596
It is always run (and should always run last) to set table ownership correctly.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
2+
<databaseChangeLog objectQuotingStrategy="QUOTE_ALL_OBJECTS"
3+
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
4+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
5+
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.3.xsd">
6+
7+
<!-- This index had low cardinality, we found that ignoring it yielded empirically better performance -->
8+
<changeSet author="anichols" id="workflow_store_drop_state_index" dbms="mysql,hsqldb,postgresql,mariadb">
9+
<dropIndex tableName="WORKFLOW_STORE_ENTRY" indexName="IX_WORKFLOW_STORE_ENTRY_WS"/>
10+
</changeSet>
11+
12+
</databaseChangeLog>

database/sql/src/main/scala/cromwell/database/slick/tables/WorkflowStoreEntryComponent.scala

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -62,8 +62,6 @@ trait WorkflowStoreEntryComponent {
6262
) <> ((WorkflowStoreEntry.apply _).tupled, WorkflowStoreEntry.unapply)
6363

6464
def ucWorkflowStoreEntryWeu = index("UC_WORKFLOW_STORE_ENTRY_WEU", workflowExecutionUuid, unique = true)
65-
66-
def ixWorkflowStoreEntryWs = index("IX_WORKFLOW_STORE_ENTRY_WS", workflowState, unique = false)
6765
}
6866

6967
protected val workflowStoreEntries = TableQuery[WorkflowStoreEntries]

0 commit comments

Comments
 (0)