- Issue created by @DiDebru
- Status changed to Postponed: needs info
over 1 year ago 10:38am 19 September 2023 - π©πͺGermany DiDebru
Good question but unfortunately I don't have an answer yet but with that patch it does not happen.
- Status changed to Needs review
about 1 year ago 1:18am 27 October 2023 - last update
about 1 year ago 29,676 pass - πΊπΈUnited States tetranz
I've updated this to check if the table has an expire column. I got this error on a site which has a custom table with a name starting with cache_ but it does not have an expire column. It is used as a cache which never expires.
I left DiDebru's check there but I don't really see how the table could not exist. I think that would give a different error message.
- last update
about 1 year ago 30,438 pass - Status changed to Postponed: needs info
about 1 year ago 3:04pm 27 October 2023 - πΊπΈUnited States smustgrave
We still would need steps that caused this to happen. I did a 9.5 to 10.1 update just yesterday funny enough but did not hit this error. I hit a separate issue and turned out one of the custom modules had a problem. So wonder if that's the case here too.
- Status changed to Needs review
about 1 year ago 6:02pm 27 October 2023 - Status changed to Needs work
about 1 year ago 6:21pm 27 October 2023 - πΊπΈUnited States smustgrave
If an issue caused by core and not a custom module will need a test case also.
Our team ran into this issue and it hung after using the above patch. After looking into the update hook a bit further we compared changeField to watchdog's use of changefield and noticed a difference.
We changed
$schema->changeField('sessions', 'timestamp', 'timestamp', $new);
to
$connection->schema()->changeField('sessions', 'timestamp', 'timestamp', $new);
Attached is a patch for 10.1.6. I couldn't grab the branch that the issue was applied to, but at least our patch is here for others to bypass this problem.
I wanted to repost that our issue was more to do with the size of the tables. In our case the size of our queue tables were substantial, but after truncating the tables we were able to upgrade with no issues.
- π¬π§United Kingdom catch
I don't think this needs explicit test coverage - we would have to make an additional database dump, with a custom/bogus cache_something table, then update that dump in the update test, to show that we don't get an error. Since we already test the update without such a table, we have implicit test coverage of the if statements in the usual case anyway.
However this could use the patch in #5 converted to an MR, and if possible I'd like to get this committed before 10.2.0's release next week.
- π¬π§United Kingdom alexpott πͺπΊπ
I think we could build the list of cache bins from the container - or maybe even get it from there. And then we wouldn't be potentially touch other tables.
- π¬π§United Kingdom alexpott πͺπΊπ
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 3388170-system-update-10100 to hidden.
- π¬π§United Kingdom alexpott πͺπΊπ
alexpott β changed the visibility of the branch 10.1.x to hidden.
- Status changed to Needs review
about 1 year ago 10:41am 7 December 2023 - Status changed to RTBC
about 1 year ago 2:57pm 7 December 2023 - πΊπΈUnited States smustgrave
Just posting here from the MR that alexpott ran
1) Drupal\Tests\system\Functional\Update\Y2038TimestampUpdateTest::testUpdate The update failed with the following message: "Failed: Drupal\Core\Database\SchemaObjectDoesNotExistException: Cannot change the definition of field 'cache_bogus.expire': field doesn't exist. in Drupal\mysql\Driver\Database\mysql\Schema->changeField() (line 615 of /builds/project/drupal/core/modules/mysql/src/Driver/Database/mysql/Schema.php)." /builds/project/drupal/core/tests/Drupal/Tests/UpdatePathTestTrait.php:59 /builds/project/drupal/core/modules/system/tests/src/Functional/Update/Y2038TimestampUpdateTest.php:115 /builds/project/drupal/vendor/phpunit/phpunit/src/Framework/TestResult.php:728 FAILURES! Tests: 1, Assertions: 36, Failures: 1.
So test coverage appears to be there, applied the MR locally and can run the update just fine. Hope it can make it to 10.2
- Status changed to Downport
about 1 year ago 1:16pm 11 December 2023 - π¬π§United Kingdom catch
Committed/pushed to 11.x and 10..2.x, thanks!
10.1.x has had its last security release, so we need to decide what to do there a bit.
- π¬π§United Kingdom catch
Cherry-picked to 10.1.x, we can figure out if/when to release later.
- Status changed to Fixed
about 1 year ago 7:07pm 13 December 2023 Automatically closed - issue fixed for 2 weeks with no activity.