-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: optimize state machines (#1396)
* feat: optimize state machine with index on state and state_timestamp * chore: deps file
- Loading branch information
Showing
11 changed files
with
298 additions
and
239 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
15 changes: 15 additions & 0 deletions
15
...esql/migration/contractnegotiation/V0_0_9__Alter_ContractNegotiation_CreateStateIndex.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- | ||
-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
-- | ||
-- This program and the accompanying materials are made available under the | ||
-- terms of the Apache License, Version 2.0 which is available at | ||
-- https://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
-- | ||
-- Contributors: | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
-- | ||
|
||
-- This will help to identify states that need to be transitioned without a table scan when the entries grow | ||
CREATE INDEX IF NOT EXISTS contract_negotiation_state ON edc_contract_negotiation (state,state_timestamp); |
15 changes: 15 additions & 0 deletions
15
.../edc/postgresql/migration/policy-monitor/V0_0_2__Alter_PolicyMonitor_CreateStateIndex.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- | ||
-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
-- | ||
-- This program and the accompanying materials are made available under the | ||
-- terms of the Apache License, Version 2.0 which is available at | ||
-- https://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
-- | ||
-- Contributors: | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
-- | ||
|
||
-- This will help to identify states that need to be transitioned without a table scan when the entries grow | ||
CREATE INDEX IF NOT EXISTS policy_monitor_state ON edc_policy_monitor (state,state_time_stamp); |
16 changes: 16 additions & 0 deletions
16
.../postgresql/migration/transferprocess/V0_0_16__Alter_TransferProcess_CreateStateIndex.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- | ||
-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
-- | ||
-- This program and the accompanying materials are made available under the | ||
-- terms of the Apache License, Version 2.0 which is available at | ||
-- https://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
-- | ||
-- Contributors: | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
-- | ||
|
||
-- This will help to identify states that need to be transitioned without a table scan when the entries grow | ||
CREATE INDEX IF NOT EXISTS transfer_process_state ON edc_transfer_process (state,state_time_stamp); | ||
|
15 changes: 15 additions & 0 deletions
15
...stgresql/migration/dataplane/V0_0_2__Alter_Dataplane_AddTransferTypeDestinationColumn.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
-- | ||
-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
-- | ||
-- This program and the accompanying materials are made available under the | ||
-- terms of the Apache License, Version 2.0 which is available at | ||
-- https://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
-- | ||
-- Contributors: | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
-- | ||
|
||
|
||
ALTER TABLE edc_data_plane ADD COLUMN transfer_type_destination VARCHAR DEFAULT 'HttpData'; |
16 changes: 16 additions & 0 deletions
16
.../tractusx/edc/postgresql/migration/dataplane/V0_0_3__Alter_Dataplane_CreateStateIndex.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
-- | ||
-- Copyright (c) 2024 Bayerische Motoren Werke Aktiengesellschaft (BMW AG) | ||
-- | ||
-- This program and the accompanying materials are made available under the | ||
-- terms of the Apache License, Version 2.0 which is available at | ||
-- https://www.apache.org/licenses/LICENSE-2.0 | ||
-- | ||
-- SPDX-License-Identifier: Apache-2.0 | ||
-- | ||
-- Contributors: | ||
-- Bayerische Motoren Werke Aktiengesellschaft (BMW AG) - initial API and implementation | ||
-- | ||
|
||
|
||
-- This will help to identify states that need to be transitioned without a table scan when the entries grow | ||
CREATE INDEX IF NOT EXISTS data_plane_state ON edc_data_plane (state,state_time_stamp); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters