diff --git a/core/modules/comment/comment.install b/core/modules/comment/comment.install
index 47241c281d..7618300606 100644
--- a/core/modules/comment/comment.install
+++ b/core/modules/comment/comment.install
@@ -184,3 +184,13 @@ function comment_update_8301() {
   $entity_type->set('entity_keys', $keys);
   $definition_update_manager->updateEntityType($entity_type);
 }
+
+/**
+ * Make the entity_type field for comments required.
+ */
+function comment_update_8400() {
+  $definition_update_manager = \Drupal::entityDefinitionUpdateManager();
+  $field_definition = $definition_update_manager->getFieldStorageDefinition('entity_type', 'comment');
+  $field_definition->setRequired(TRUE);
+  $definition_update_manager->updateFieldStorageDefinition($field_definition);
+}
diff --git a/core/modules/comment/src/Entity/Comment.php b/core/modules/comment/src/Entity/Comment.php
index 821b30d0ba..4233b8672a 100644
--- a/core/modules/comment/src/Entity/Comment.php
+++ b/core/modules/comment/src/Entity/Comment.php
@@ -310,6 +310,7 @@ public static function baseFieldDefinitions(EntityTypeInterface $entity_type) {
     $fields['entity_type'] = BaseFieldDefinition::create('string')
       ->setLabel(t('Entity type'))
       ->setDescription(t('The entity type to which this comment is attached.'))
+      ->setStorageRequired(TRUE)
       ->setSetting('is_ascii', TRUE)
       ->setSetting('max_length', EntityTypeInterface::ID_MAX_LENGTH);
 
diff --git a/core/modules/comment/src/Tests/Update/CommentUpdateTest.php b/core/modules/comment/src/Tests/Update/CommentUpdateTest.php
index 3db9c4a67b..bf4baff3ca 100644
--- a/core/modules/comment/src/Tests/Update/CommentUpdateTest.php
+++ b/core/modules/comment/src/Tests/Update/CommentUpdateTest.php
@@ -2,6 +2,7 @@
 
 namespace Drupal\comment\Tests\Update;
 
+use Drupal\Core\Database\Database;
 use Drupal\system\Tests\Update\UpdatePathTestBase;
 
 /**
@@ -71,4 +72,29 @@ public function testPublishedEntityKey() {
     $this->assertTrue(\Drupal::database()->schema()->indexExists('comment_field_data', 'comment__status_comment_type'));
   }
 
+  /**
+   * Tests whether the 'entity_type' column is required.
+   *
+   * @see comment_update_8204()
+   */
+  public function testCommentEntityTypeRequired() {
+    $this->assertEqual(2, Database::getConnection()->query('SELECT count(*) FROM {comment_field_data}')->fetchField());
+    if (Database::getConnection()->driver() === 'mysql') {
+      $table_description = \Drupal::database()
+        ->query('DESCRIBE comment_field_data')
+        ->fetchAllAssoc('Field');
+      $this->assertEqual($table_description['entity_type']->Null, 'YES');
+    }
+
+    $this->runUpdates();
+
+    $this->assertEqual(2, Database::getConnection()->query('SELECT count(*) FROM {comment_field_data}')->fetchField());
+    if (Database::getConnection()->driver() === 'mysql') {
+      $table_description = \Drupal::database()
+        ->query('DESCRIBE comment_field_data')
+        ->fetchAllAssoc('Field');
+      $this->assertEqual($table_description['entity_type']->Null, 'NO');
+    }
+  }
+
 }
diff --git a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
index ea705de8a4..b8ebc26883 100644
--- a/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
+++ b/core/modules/rest/tests/src/Functional/EntityResource/Comment/CommentResourceTestBase.php
@@ -275,11 +275,7 @@ public function testPostDxWithoutCriticalBaseFields() {
     // DX: 422 when missing 'entity_type' field.
     $request_options[RequestOptions::BODY] = $this->serializer->encode(array_diff_key($this->getNormalizedPostEntity(), ['entity_type' => TRUE]), static::$format);
     $response = $this->request('POST', $url, $request_options);
-    // @todo Uncomment, remove next 3 lines in https://www.drupal.org/node/2820364.
-    $this->assertSame(500, $response->getStatusCode());
-    $this->assertSame(['text/plain; charset=UTF-8'], $response->getHeader('Content-Type'));
-    $this->assertStringStartsWith('The website encountered an unexpected error. Please try again later.</br></br><em class="placeholder">Symfony\Component\HttpKernel\Exception\HttpException</em>: Internal Server Error in <em class="placeholder">Drupal\rest\Plugin\rest\resource\EntityResource-&gt;post()</em>', (string) $response->getBody());
-    //$this->assertResourceErrorResponse(422, "Unprocessable Entity: validation failed.\nentity_type: This value should not be null.\n", $response);
+    $this->assertResourceErrorResponse(422, "Unprocessable Entity: validation failed.\nentity_type: This value should not be null.\n", $response);
 
     // DX: 422 when missing 'entity_id' field.
     $request_options[RequestOptions::BODY] = $this->serializer->encode(array_diff_key($this->getNormalizedPostEntity(), ['entity_id' => TRUE]), static::$format);
