#107406Revert "Avoid costly database schema queries and class state"
Description
Nightly CI revelead issues with the recently merged change for #107390
and further investigation revealed that the filesystem cache used for
the is not reliabe in edge cases, for example when trying to lookup the
name of column type read from the filesystem cache using the current
instance doctrine types registry because if the usage of *spl_object_id*
within the registry.
Trying to circument this is issue now is not really doable without more
investigation and broader changes and is therefore reverted now.
#0 /builds/typo3/CI/cms/vendor/doctrine/dbal/src/Types/TypeRegistry.php(61): Doctrine\\DBAL\\Types\\Exception\\TypeNotRegistered::new()\n
#1 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(2735): Doctrine\\DBAL\\Types\\TypeRegistry->lookupName()
#2 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(485): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->search()
#3 /builds/typo3/CI/cms/typo3/sysext/lowlevel/Classes/Controller/DatabaseIntegrityController.php(252): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->searchAction()
#4 /builds/typo3/CI/cms/typo3/sysext/backend/Classes/Http/RouteDispatcher.php(84): TYPO3\\CMS\\Lowlevel\\Controller\\DatabaseIntegrityController->handleRequest()
...
#49 /builds/typo3/CI/cms/typo3temp/var/tests/acceptance/index.php(21): {closure}()
#50 {main}"}
Using current request/process Doctrine\\DBAL\\Types\\TypeRegistry->lookupName()
instance with a Column->getType() instance when read from filesystem cache leads
to another “type” object instance than the one registerd in the registry, because
@spl_object_id@ is used and ending in a exception that the type is not registered
simply because the same “class” is compared with two different instances and thus
getting different integer id’s and is integrated deep in doctrine dbal.
Reviews 8
- main 90566[WIP][TASK] Warmup database cache listening to `CacheWarmupEvent`
- 13.4 90966[TASK] Avoid costly database schema queries and class state
- main 90788[TASK] Avoid costly database schema queries and class state
- 13.4 90950[TASK] Use `runtime` cache in `SchemaInformation` as 2nd level cache
- main 90563[TASK] Use `runtime` cache in `SchemaInformation` as 2nd level cache
- 13.4 90947[TASK] Streamline `SchemaInformation` cache handling
- main 90786[TASK] Streamline `SchemaInformation` cache handling
- main 90588Revert "[TASK] Avoid costly database schema queries and class state"
Related issues 5
- Task #107390Avoid costly database schema queries and class state
- Task #107546Streamline `SchemaInformation` cache handling
- Task #107610Introduce `runtime` cache to `SchemaInformation`
- Task #107611Avoid costly database schema queries and class state
- Task #107612Warmup database cache listening to `CacheWarmupEvent`