diff --git a/core/core.services.yml b/core/core.services.yml
index 20e5da30d8..08b09d9953 100644
--- a/core/core.services.yml
+++ b/core/core.services.yml
@@ -552,7 +552,7 @@ services:
     class: Drupal\Core\Cache\MemoryCache\MemoryCache
   entity_type.manager:
     class: Drupal\Core\Entity\EntityTypeManager
-    arguments: ['@container.namespaces', '@module_handler', '@cache.discovery', '@string_translation', '@class_resolver']
+    arguments: ['@container.namespaces', '@module_handler', '@cache.discovery', '@string_translation', '@class_resolver', '@entity.last_installed_schema.repository']
     parent: container.trait
     tags:
       - { name: plugin_manager_cache_clear }
diff --git a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
index 5baf85fd1f..58aede1920 100644
--- a/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityDefinitionUpdateManager.php
@@ -227,6 +227,7 @@ public function updateFieldableEntityType(EntityTypeInterface $entity_type, arra
 
     $original_field_storage_definitions = $this->entityLastInstalledSchemaRepository->getLastInstalledFieldStorageDefinitions($entity_type->id());
     $this->entityTypeListener->onFieldableEntityTypeUpdate($entity_type, $original, $field_storage_definitions, $original_field_storage_definitions, $sandbox);
+    $this->clearCachedDefinitions();
   }
 
   /**
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeListener.php b/core/lib/Drupal/Core/Entity/EntityTypeListener.php
index a8c90c4861..2333a00d9e 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeListener.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeListener.php
@@ -77,6 +77,7 @@ public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
     if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) {
       $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinitions($entity_type_id, $this->entityFieldManager->getFieldStorageDefinitions($entity_type_id));
     }
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
   /**
@@ -95,6 +96,7 @@ public function onEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeI
     $this->eventDispatcher->dispatch(EntityTypeEvents::UPDATE, new EntityTypeEvent($entity_type, $original));
 
     $this->entityLastInstalledSchemaRepository->setLastInstalledDefinition($entity_type);
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
   /**
@@ -113,6 +115,7 @@ public function onEntityTypeDelete(EntityTypeInterface $entity_type) {
     $this->eventDispatcher->dispatch(EntityTypeEvents::DELETE, new EntityTypeEvent($entity_type));
 
     $this->entityLastInstalledSchemaRepository->deleteLastInstalledDefinition($entity_type_id);
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
   /**
@@ -135,6 +138,7 @@ public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, En
       if ($entity_type->entityClassImplements(FieldableEntityInterface::class)) {
         $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinitions($entity_type_id, $field_storage_definitions);
       }
+      $this->entityTypeManager->clearCachedDefinitions();
     }
   }
 
diff --git a/core/lib/Drupal/Core/Entity/EntityTypeManager.php b/core/lib/Drupal/Core/Entity/EntityTypeManager.php
index 9fecdb542a..3db27714fe 100644
--- a/core/lib/Drupal/Core/Entity/EntityTypeManager.php
+++ b/core/lib/Drupal/Core/Entity/EntityTypeManager.php
@@ -58,6 +58,13 @@ class EntityTypeManager extends DefaultPluginManager implements EntityTypeManage
    */
   protected $classResolver;
 
+  /**
+   * The entity last installed schema repository.
+   *
+   * @var \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface
+   */
+  protected $entityLastInstalledSchemaRepository;
+
   /**
    * Constructs a new Entity plugin manager.
    *
@@ -72,8 +79,10 @@ class EntityTypeManager extends DefaultPluginManager implements EntityTypeManage
    *   The string translation.
    * @param \Drupal\Core\DependencyInjection\ClassResolverInterface $class_resolver
    *   The class resolver.
+   * @param \Drupal\Core\Entity\EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository
+   *   The entity last installed schema repository.
    */
-  public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, TranslationInterface $string_translation, ClassResolverInterface $class_resolver) {
+  public function __construct(\Traversable $namespaces, ModuleHandlerInterface $module_handler, CacheBackendInterface $cache, TranslationInterface $string_translation, ClassResolverInterface $class_resolver, EntityLastInstalledSchemaRepositoryInterface $entity_last_installed_schema_repository) {
     parent::__construct('Entity', $namespaces, $module_handler, 'Drupal\Core\Entity\EntityInterface');
 
     $this->setCacheBackend($cache, 'entity_type', ['entity_types']);
@@ -82,6 +91,7 @@ public function __construct(\Traversable $namespaces, ModuleHandlerInterface $mo
     $this->discovery = new AnnotatedClassDiscovery('Entity', $namespaces, 'Drupal\Core\Entity\Annotation\EntityType');
     $this->stringTranslation = $string_translation;
     $this->classResolver = $class_resolver;
+    $this->entityLastInstalledSchemaRepository = $entity_last_installed_schema_repository;
   }
 
   /**
@@ -231,7 +241,11 @@ public function getAccessControlHandler($entity_type_id) {
    */
   public function getHandler($entity_type_id, $handler_type) {
     if (!isset($this->handlers[$handler_type][$entity_type_id])) {
-      $definition = $this->getDefinition($entity_type_id);
+      $definition = NULL;
+      if ($handler_type === 'storage') {
+        $definition = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type_id);
+      }
+      $definition = $definition ?: $this->getDefinition($entity_type_id);
       $class = $definition->getHandlerClass($handler_type);
       if (!$class) {
         throw new InvalidPluginDefinitionException($entity_type_id, sprintf('The "%s" entity type did not specify a %s handler.', $entity_type_id, $handler_type));
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
index 2f770aede1..54e7725722 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorage.php
@@ -42,6 +42,13 @@
  */
 class SqlContentEntityStorage extends ContentEntityStorageBase implements SqlEntityStorageInterface, DynamicallyFieldableEntityStorageSchemaInterface, EntityBundleListenerInterface {
 
+  /**
+   * The entity type's field storage definitions.
+   *
+   * @var \Drupal\Core\Field\FieldStorageDefinitionInterface[]
+   */
+  protected $fieldStorageDefinitions;
+
   /**
    * The mapping of field columns to SQL tables.
    *
@@ -206,6 +213,7 @@ public function __construct(EntityTypeInterface $entity_type, Connection $databa
       $entity_type_manager = \Drupal::entityTypeManager();
     }
     $this->entityTypeManager = $entity_type_manager;
+    $this->fieldStorageDefinitions = $entity_last_installed_schema_repository->getLastInstalledFieldStorageDefinitions($this->entityTypeId);
 
     $this->initTableLayout();
   }
@@ -313,6 +321,25 @@ public function setEntityType(EntityTypeInterface $entity_type) {
     }
   }
 
+  /**
+   * Updates the internal list of field storage definitions.
+   *
+   * @param \Drupal\Core\Field\FieldStorageDefinitionInterface[] $field_storage_definitions
+   *   An array of field storage definitions.
+   *
+   * @internal Only to be used internally by Entity API.
+   */
+  public function setFieldStorageDefinitions(array $field_storage_definitions) {
+    foreach ($field_storage_definitions as $field_storage_definition) {
+      if ($field_storage_definition->getTargetEntityTypeId() !== $this->entityType->id()) {
+        throw new EntityStorageException("Unsupported entity type {$field_storage_definition->getTargetEntityTypeId()}");
+      }
+    }
+
+    $this->fieldStorageDefinitions = $field_storage_definitions;
+    $this->initTableLayout();
+  }
+
   /**
    * Sets the wrapped table mapping definition.
    *
@@ -357,9 +384,7 @@ public function getTableMapping(array $storage_definitions = NULL) {
     // If we are using our internal storage definitions, which is our main use
     // case, we can statically cache the computed table mapping.
     if (!isset($this->tableMapping)) {
-      $storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions($this->entityTypeId);
-
-      $this->tableMapping = $this->getCustomTableMapping($this->entityType, $storage_definitions);
+      $this->tableMapping = $this->getCustomTableMapping($this->entityType, $this->fieldStorageDefinitions);
     }
 
     return $this->tableMapping;
@@ -463,7 +488,7 @@ protected function mapFromStorageRecords(array $records, $load_from_revision = F
       $field_names = array_unique(array_merge($field_names, $this->tableMapping->getFieldNames($this->revisionTable)));
     }
 
-    $storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions($this->entityTypeId);
+    $storage_definitions = $this->fieldStorageDefinitions;
     $values = [];
     foreach ($records as $id => $record) {
       $values[$id] = [];
@@ -582,7 +607,7 @@ protected function loadFromSharedTables(array &$values, array &$translations, $l
         $all_fields = $table_mapping->getFieldNames($this->dataTable);
       }
 
-      $storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions($this->entityTypeId);
+      $storage_definitions = $this->fieldStorageDefinitions;
       $result = $query->execute();
       foreach ($result as $row) {
         $id = $row[$record_key];
@@ -898,7 +923,7 @@ protected function doSaveFieldItems(ContentEntityInterface $entity, array $names
     }
     else {
       $table_mapping = $this->getTableMapping();
-      $storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions($this->entityTypeId);
+      $storage_definitions = $this->fieldStorageDefinitions;
       $shared_table_fields = FALSE;
       $dedicated_table_fields = [];
 
@@ -1059,10 +1084,10 @@ protected function mapToStorageRecord(ContentEntityInterface $entity, $table_nam
     $table_mapping = $this->getTableMapping();
     foreach ($table_mapping->getFieldNames($table_name) as $field_name) {
 
-      if (empty($this->getFieldStorageDefinitions()[$field_name])) {
+      if (empty($this->fieldStorageDefinitions[$field_name])) {
         throw new EntityStorageException("Table mapping contains invalid field $field_name.");
       }
-      $definition = $this->getFieldStorageDefinitions()[$field_name];
+      $definition = $this->fieldStorageDefinitions[$field_name];
       $columns = $table_mapping->getColumnNames($field_name);
 
       foreach ($columns as $column_name => $schema_name) {
@@ -1229,9 +1254,11 @@ protected function loadFromDedicatedTables(array &$values, $load_from_revision)
     foreach ($bundles as $bundle => $v) {
       $definitions[$bundle] = $this->entityFieldManager->getFieldDefinitions($this->entityTypeId, $bundle);
       foreach ($definitions[$bundle] as $field_name => $field_definition) {
-        $storage_definition = $field_definition->getFieldStorageDefinition();
-        if ($table_mapping->requiresDedicatedTableStorage($storage_definition)) {
-          $storage_definitions[$field_name] = $storage_definition;
+        if (isset($this->fieldStorageDefinitions[$field_name])) {
+          $storage_definition = $this->fieldStorageDefinitions[$field_name];
+          if ($table_mapping->requiresDedicatedTableStorage($storage_definition)) {
+            $storage_definitions[$field_name] = $storage_definition;
+          }
         }
       }
     }
@@ -1321,7 +1348,11 @@ protected function saveToDedicatedTables(ContentEntityInterface $entity, $update
     }
 
     foreach ($definitions as $field_name => $field_definition) {
-      $storage_definition = $field_definition->getFieldStorageDefinition();
+      if (!isset($this->fieldStorageDefinitions[$field_name])) {
+        continue;
+      }
+
+      $storage_definition = $this->fieldStorageDefinitions[$field_name];
       if (!$table_mapping->requiresDedicatedTableStorage($storage_definition)) {
         continue;
       }
@@ -1420,8 +1451,7 @@ protected function saveToDedicatedTables(ContentEntityInterface $entity, $update
    */
   protected function deleteFromDedicatedTables(ContentEntityInterface $entity) {
     $table_mapping = $this->getTableMapping();
-    foreach ($this->entityFieldManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $field_definition) {
-      $storage_definition = $field_definition->getFieldStorageDefinition();
+    foreach ($this->fieldStorageDefinitions as $storage_definition) {
       if (!$table_mapping->requiresDedicatedTableStorage($storage_definition)) {
         continue;
       }
@@ -1448,8 +1478,7 @@ protected function deleteRevisionFromDedicatedTables(ContentEntityInterface $ent
     $vid = $entity->getRevisionId();
     if (isset($vid)) {
       $table_mapping = $this->getTableMapping();
-      foreach ($this->entityFieldManager->getFieldDefinitions($entity->getEntityTypeId(), $entity->bundle()) as $field_definition) {
-        $storage_definition = $field_definition->getFieldStorageDefinition();
+      foreach ($this->fieldStorageDefinitions as $storage_definition) {
         if (!$table_mapping->requiresDedicatedTableStorage($storage_definition)) {
           continue;
         }
@@ -1494,6 +1523,11 @@ public function requiresFieldDataMigration(FieldStorageDefinitionInterface $stor
    * {@inheritdoc}
    */
   public function onEntityTypeCreate(EntityTypeInterface $entity_type) {
+    // Ensure we have an updated entity type and field storage definitions.
+    $this->entityType = $entity_type;
+    $this->fieldStorageDefinitions = $this->entityFieldManager->getFieldStorageDefinitions($entity_type->id());
+    $this->initTableLayout();
+
     $this->wrapSchemaException(function () use ($entity_type) {
       $this->getStorageSchema()->onEntityTypeCreate($entity_type);
     });
@@ -1554,9 +1588,8 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $
    * {@inheritdoc}
    */
   public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $storage_definition) {
-    $table_mapping = $this->getTableMapping(
-      $this->entityLastInstalledSchemaRepository->getLastInstalledFieldStorageDefinitions($this->entityType->id())
-    );
+    $this->fieldStorageDefinitions[$storage_definition->getName()] = $storage_definition;
+    $table_mapping = $this->getTableMapping($this->fieldStorageDefinitions);
 
     if ($table_mapping->requiresDedicatedTableStorage($storage_definition)) {
       // Mark all data associated with the field for deletion.
@@ -1733,7 +1766,7 @@ public function countFieldData($storage_definition, $as_bool = FALSE) {
     // storage definition is added, so bypass the internal storage definitions
     // and fetch the table mapping using the passed in storage definition.
     // @todo Fix this in https://www.drupal.org/node/2705205.
-    $storage_definitions = $this->entityFieldManager->getFieldStorageDefinitions($this->entityTypeId);
+    $storage_definitions = $this->fieldStorageDefinitions;
     $storage_definitions[$storage_definition->getName()] = $storage_definition;
     $table_mapping = $this->getTableMapping($storage_definitions);
 
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
index 1459f01c05..d44199bdae 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlContentEntityStorageSchema.php
@@ -462,6 +462,8 @@ protected function preUpdateEntityTypeSchema(EntityTypeInterface $entity_type, E
     $original_table_mapping = $original_storage->getCustomTableMapping($original, $original_field_storage_definitions);
     $original_storage->setTableMapping($original_table_mapping);
 
+    $sandbox['temporary_table_mapping'] = $temporary_table_mapping;
+    $sandbox['original_table_mapping'] = $original_table_mapping;
     $sandbox['new_table_mapping'] = $temporary_storage->getCustomTableMapping($entity_type, $field_storage_definitions);
     $sandbox['backup_table_mapping'] = $original_storage->getCustomTableMapping($original, $original_field_storage_definitions, 'old_');
 
@@ -498,9 +500,9 @@ protected function preUpdateEntityTypeSchema(EntityTypeInterface $entity_type, E
    */
   protected function postUpdateEntityTypeSchema(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
     /** @var \Drupal\Core\Entity\Sql\TableMappingInterface $temporary_table_mapping */
-    $temporary_table_mapping = $sandbox['temporary_storage']->getTableMapping();
+    $temporary_table_mapping = $sandbox['temporary_table_mapping'];
     /** @var \Drupal\Core\Entity\Sql\TableMappingInterface $original_table_mapping */
-    $original_table_mapping = $sandbox['original_storage']->getTableMapping();
+    $original_table_mapping = $sandbox['original_table_mapping'];
     /** @var \Drupal\Core\Entity\Sql\TableMappingInterface $new_table_mapping */
     $new_table_mapping = $sandbox['new_table_mapping'];
     /** @var \Drupal\Core\Entity\Sql\TableMappingInterface $backup_table_mapping */
@@ -625,6 +627,7 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $
    * {@inheritdoc}
    */
   public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $storage_definition, FieldStorageDefinitionInterface $original) {
+    $this->fieldStorageDefinitions[$storage_definition->getName()] = $storage_definition;
     $this->performFieldSchemaOperation('update', $storage_definition, $original);
   }
 
diff --git a/core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php b/core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php
index 4b31a185c5..7948d9124f 100644
--- a/core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php
+++ b/core/lib/Drupal/Core/Entity/Sql/SqlFieldableEntityTypeListenerTrait.php
@@ -21,6 +21,7 @@
   public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, EntityTypeInterface $original, array $field_storage_definitions, array $original_field_storage_definitions, array &$sandbox = NULL) {
     /** @var \Drupal\Core\Entity\EntityStorageInterface $original_storage */
     $original_storage = $this->entityTypeManager->createHandlerInstance($original->getStorageClass(), $original);
+    $original_storage->setFieldStorageDefinitions($original_field_storage_definitions);
     $has_data = $original_storage->hasData();
 
     // If 'progress' is not set, then this will be the first run of the batch.
@@ -58,8 +59,11 @@ public function onFieldableEntityTypeUpdate(EntityTypeInterface $entity_type, En
         throw new EntityStorageException('Missing revision_translation_affected field.');
       }
 
+      $temporary_storage = $this->entityTypeManager->createHandlerInstance($entity_type->getStorageClass(), $entity_type);
+      $temporary_storage->setFieldStorageDefinitions($field_storage_definitions);
+
       $sandbox['original_storage'] = $original_storage;
-      $sandbox['temporary_storage'] = $this->entityTypeManager->createHandlerInstance($entity_type->getStorageClass(), $entity_type);
+      $sandbox['temporary_storage'] = $temporary_storage;
 
       $this->preUpdateEntityTypeSchema($entity_type, $original, $field_storage_definitions, $original_field_storage_definitions, $sandbox);
     }
diff --git a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
index e67629b759..ad148506ee 100644
--- a/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
+++ b/core/lib/Drupal/Core/Field/FieldStorageDefinitionListener.php
@@ -82,17 +82,7 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $
 
     // @todo Forward this to all interested handlers, not only storage, once
     //   iterating handlers is possible: https://www.drupal.org/node/2332857.
-    $storage = clone $this->entityTypeManager->getStorage($entity_type_id);
-
-    // Entity type definition updates can change the schema by adding or
-    // removing entity tables (for example when switching an entity type from
-    // non-revisionable to revisionable), so CRUD operations on a field storage
-    // definition need to use the last installed entity type schema.
-    if ($storage instanceof SqlContentEntityStorage
-       && ($last_installed_entity_type = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type_id))) {
-      $storage->setEntityType($last_installed_entity_type);
-    }
-
+    $storage = $this->entityTypeManager->getStorage($entity_type_id);
     if ($storage instanceof FieldStorageDefinitionListenerInterface) {
       $storage->onFieldStorageDefinitionCreate($storage_definition);
     }
@@ -101,6 +91,7 @@ public function onFieldStorageDefinitionCreate(FieldStorageDefinitionInterface $
 
     $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
   /**
@@ -111,17 +102,7 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $
 
     // @todo Forward this to all interested handlers, not only storage, once
     //   iterating handlers is possible: https://www.drupal.org/node/2332857.
-    $storage = clone $this->entityTypeManager->getStorage($entity_type_id);
-
-    // Entity type definition updates can change the schema by adding or
-    // removing entity tables (for example when switching an entity type from
-    // non-revisionable to revisionable), so CRUD operations on a field storage
-    // definition need to use the last installed entity type schema.
-    if ($storage instanceof SqlContentEntityStorage
-       && ($last_installed_entity_type = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type_id))) {
-      $storage->setEntityType($last_installed_entity_type);
-    }
-
+    $storage = $this->entityTypeManager->getStorage($entity_type_id);
     if ($storage instanceof FieldStorageDefinitionListenerInterface) {
       $storage->onFieldStorageDefinitionUpdate($storage_definition, $original);
     }
@@ -130,6 +111,7 @@ public function onFieldStorageDefinitionUpdate(FieldStorageDefinitionInterface $
 
     $this->entityLastInstalledSchemaRepository->setLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
   /**
@@ -140,32 +122,15 @@ public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $
 
     // @todo Forward this to all interested handlers, not only storage, once
     //   iterating handlers is possible: https://www.drupal.org/node/2332857.
-    $storage = clone $this->entityTypeManager->getStorage($entity_type_id);
-
-    // Entity type definition updates can change the schema by adding or
-    // removing entity tables (for example when switching an entity type from
-    // non-revisionable to revisionable), so CRUD operations on a field storage
-    // definition need to use the last installed entity type schema.
-    if ($storage instanceof SqlContentEntityStorage
-       && ($last_installed_entity_type = $this->entityLastInstalledSchemaRepository->getLastInstalledDefinition($entity_type_id))) {
-      $storage->setEntityType($last_installed_entity_type);
-    }
+    $storage = $this->entityTypeManager->getStorage($entity_type_id);
 
     // Keep the field definition in the deleted fields repository so we can use
     // it later during field_purge_batch(), but only if the field has data.
-    try {
-      if ($storage_definition instanceof BaseFieldDefinition && $storage instanceof FieldableEntityStorageInterface && $storage->countFieldData($storage_definition, TRUE)) {
-        $deleted_storage_definition = clone $storage_definition;
-        $deleted_storage_definition->setDeleted(TRUE);
-        $this->deletedFieldsRepository->addFieldDefinition($deleted_storage_definition);
-        $this->deletedFieldsRepository->addFieldStorageDefinition($deleted_storage_definition);
-      }
-    }
-    catch (DatabaseExceptionWrapper $e) {
-      // This may happen when changing field storage schema, since we are not
-      // able to use a table mapping matching the passed storage definition.
-      // @todo Revisit this once we are able to instantiate the table mapping
-      //   properly. See https://www.drupal.org/node/2274017.
+    if ($storage_definition instanceof BaseFieldDefinition && $storage instanceof FieldableEntityStorageInterface && $storage->countFieldData($storage_definition, TRUE)) {
+      $deleted_storage_definition = clone $storage_definition;
+      $deleted_storage_definition->setDeleted(TRUE);
+      $this->deletedFieldsRepository->addFieldDefinition($deleted_storage_definition);
+      $this->deletedFieldsRepository->addFieldStorageDefinition($deleted_storage_definition);
     }
 
     if ($storage instanceof FieldStorageDefinitionListenerInterface) {
@@ -176,6 +141,7 @@ public function onFieldStorageDefinitionDelete(FieldStorageDefinitionInterface $
 
     $this->entityLastInstalledSchemaRepository->deleteLastInstalledFieldStorageDefinition($storage_definition);
     $this->entityFieldManager->clearCachedFieldDefinitions();
+    $this->entityTypeManager->clearCachedDefinitions();
   }
 
 }
diff --git a/core/modules/rest/rest.post_update.php b/core/modules/rest/rest.post_update.php
index e1e1d20301..2a213b82f7 100644
--- a/core/modules/rest/rest.post_update.php
+++ b/core/modules/rest/rest.post_update.php
@@ -17,12 +17,12 @@
 function rest_post_update_create_rest_resource_config_entities() {
   $resources = \Drupal::state()->get('rest_update_8201_resources', []);
   foreach ($resources as $key => $resource) {
-    $resource = RestResourceConfig::create([
-      'id' => str_replace(':', '.', $key),
-      'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
-      'configuration' => $resource,
-    ]);
-    $resource->save();
+//    $resource = RestResourceConfig::create([
+//      'id' => str_replace(':', '.', $key),
+//      'granularity' => RestResourceConfigInterface::METHOD_GRANULARITY,
+//      'configuration' => $resource,
+//    ]);
+//    $resource->save();
   }
 }
 
diff --git a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
index 00148b466b..dd4b2d4612 100644
--- a/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
+++ b/core/modules/system/tests/src/Functional/Entity/Traits/EntityDefinitionTestTrait.php
@@ -24,12 +24,6 @@
    */
   protected function applyEntityUpdates($entity_type_id = NULL) {
     $complete_change_list = \Drupal::entityDefinitionUpdateManager()->getChangeList();
-    if ($complete_change_list) {
-      // In case there are changes, explicitly invalidate caches.
-      \Drupal::entityTypeManager()->clearCachedDefinitions();
-      \Drupal::service('entity_field.manager')->clearCachedFieldDefinitions();
-    }
-
     if ($entity_type_id) {
       $complete_change_list = array_intersect_key($complete_change_list, [$entity_type_id => TRUE]);
     }
