refactor(core): Don't use DB transactions on ExecutionRepository.createNewExecution (#8002)

Saving execution data is one of the slowest DB operations in the
application, and is likely behind some of the sqlite transaction
concurrency issues we've been seeing.
This not only remove the 2 separate transactions for saving
`ExecutionEntity` and `ExecutionData`, but also remove fields from
`ExecutionData.workflowData` that don't need to be saved (like `tags`,
`shared`, `statistics`, `triggerCount`, etc).
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-12-12 14:36:56 +01:00
committed by GitHub
parent 19e88ec8a1
commit 1d870412ca
4 changed files with 63 additions and 14 deletions

View File

@@ -12,9 +12,7 @@ const FAKE_EXECUTION_ID = '15';
const FAKE_SECOND_EXECUTION_ID = '20';
const updateExistingExecution = jest.fn();
const createNewExecution = jest.fn(async () => {
return { id: FAKE_EXECUTION_ID };
});
const createNewExecution = jest.fn(async () => FAKE_EXECUTION_ID);
Container.set(ExecutionRepository, {
updateExistingExecution,