Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
A
autosave_form
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
autosave_form
Commits
ba123ddb
Commit
ba123ddb
authored
11 months ago
by
Daniel Pfeiffer
Committed by
Hristo Chonov
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3029155
: General error: 1205 Lock wait timeout exceeded; try restarting transaction
parent
2108f953
No related branches found
No related tags found
1 merge request
!7
Issue #3029155: General error: 1205 Lock wait timeout exceeded; try restarting transaction
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
autosave_form.install
+30
-0
30 additions, 0 deletions
autosave_form.install
with
30 additions
and
0 deletions
autosave_form.install
+
30
−
0
View file @
ba123ddb
...
...
@@ -69,6 +69,9 @@ function autosave_form_schema() {
],
],
'primary key'
=>
[
'form_id'
,
'form_session_id'
,
'entity_type_id'
,
'entity_id'
,
'langcode'
,
'uid'
,
'timestamp'
],
'indexes'
=>
[
'entity_type_id__entity_id'
=>
[
'entity_type_id'
,
'entity_id'
],
],
];
return
$schema
;
...
...
@@ -120,3 +123,30 @@ function autosave_form_update_8003() {
$config
->
save
(
TRUE
);
}
}
/**
* Adds an index to optimize deletion of entities.
*
* @see \Drupal\autosave_form\Storage\AutosaveEntityFormStorageInterface::purgeAutosavedEntityState
*/
function
autosave_form_update_8004
()
{
$schema
=
\Drupal
::
database
()
->
schema
();
$spec
=
[
'fields'
=>
[
'entity_type_id'
=>
[
'type'
=>
'varchar_ascii'
,
'length'
=>
EntityTypeInterface
::
ID_MAX_LENGTH
,
'not null'
=>
TRUE
,
],
'entity_id'
=>
[
'type'
=>
'varchar_ascii'
,
'length'
=>
EntityTypeInterface
::
ID_MAX_LENGTH
,
'not null'
=>
TRUE
,
],
],
];
$fields
=
[
'entity_type_id'
,
'entity_id'
];
$schema
->
addIndex
(
AutosaveEntityFormStorageInterface
::
AUTOSAVE_ENTITY_FORM_TABLE
,
'entity_type_id__entity_id'
,
$fields
,
$spec
);
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment