Problem/Motivation

This is a follow-up for: #2753971: ContentEntityStorageBase::deleteRevision() function does not remove node_field_revision entries. Some sites could have revision data in the {node_field_revision} table that was not deleted because of #2753971.

In other words: revisions that have been deleted, have actually been deleted from {node_revision}, but not from {node_field_revision}. (Or, generally speaking: {ENTITY_TYPE_ID_revision} and {ENTITY_TYPE_ID_field_revision}.)

#2753971 was fixed in Drupal 8.3.2 (see https://www.drupal.org/project/drupal/releases/8.3.2), and so any site that had lots of revisions deleted before it updated to 8.3.2, will have lots of stale entries in {ENTITY_TYPE_ID_field_revision, which this upgrade path will clean up.

Proposed resolution

  • Write an upgrade path that delete revisions from {node_field_revision} that don't actually match with any of the revisions in {node_revision}.
  • Make this upgrade path use the Batch API to avoid possible performance issues on sites with heavy use of revisions (and hence potentially many stale records in {node_field_revision} that need to be deleted).

Remaining tasks

  • Write the patch
  • Write tests

User interface changes

None

API changes

None

Data model changes

None

CommentFileSizeAuthor
#69 2869568-69.patch8.93 KBquietone
#69 interdiff-68-69.txt3.38 KBquietone
#68 2869568-68.patch7.93 KBquietone
#68 interdiff-51-68.txt5.74 KBquietone
#51 interdiff-2869568-49-51.txt3.1 KBdagmar
#51 2869568-51.patch7.38 KBdagmar
#49 interdiff-2869568-47-49.txt2.57 KBdagmar
#49 2869568-49.patch7.39 KBdagmar
#47 interdiff-2869568-46-47.txt2.44 KBdagmar
#47 2869568-47.patch7.37 KBdagmar
#46 2869568-46.patch7.25 KBvijaycs85
#35 delete-stale-revision-data-2869568-35-interdiff.txt1.24 KBBerdir
#35 delete-stale-revision-data-2869568-35.patch7.33 KBBerdir
#33 delete-stale-revision-data-2869568-33-interdiff.txt5.34 KBBerdir
#33 delete-stale-revision-data-2869568-33.patch7.29 KBBerdir
#30 delete-stale-revision-data-2869568-30-interdiff.txt2 KBBerdir
#30 delete-stale-revision-data-2869568-30.patch6.9 KBBerdir
#26 delete-stale-revision-data-2869568-26-interdiff.txt3.92 KBBerdir
#26 delete-stale-revision-data-2869568-26.patch6.92 KBBerdir
#23 delete-stale-revision-data-2869568-23-interdiff.txt616 bytesBerdir
#23 delete-stale-revision-data-2869568-23.patch7.11 KBBerdir
#21 delete-stale-revision-data-2869568-20-interdiff.txt665 bytesBerdir
#21 delete-stale-revision-data-2869568-20.patch7.11 KBBerdir
#19 delete-stale-revision-data-2869568-19-interdiff.txt5.05 KBBerdir
#19 delete-stale-revision-data-2869568-19.patch7.09 KBBerdir
#12 delete-stale-revision-data-2869568-12-interdiff.txt452 bytesBerdir
#12 delete-stale-revision-data-2869568-12.patch6.89 KBBerdir
#11 delete-stale-revision-data-2869568-11-interdiff.txt1001 bytesBerdir
#11 delete-stale-revision-data-2869568-11.patch6.93 KBBerdir
#10 delete-stale-revision-data-2869568-10.patch6.84 KBBerdir
#10 delete-stale-revision-data-2869568-10-test-only.patch4.07 KBBerdir
#7 delete-stale-revision-data-2869568-5.patch2.76 KBBerdir
#5 delete-stale-revision-data-2869568-5.patch2.76 KBBerdir
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dagmar created an issue. See original summary.

catch’s picture

Category: Task » Bug report
Priority: Normal » Major

Thanks. Bumping this to major and bug report since it's at least possible that entity queries with allRevisions() will return invalid results.

Eric_A’s picture

Version: 8.4.x-dev » 8.3.x-dev
Status: Postponed » Active
cilefen’s picture

Title: Upgrade path: Cleanup deleted revisions from {node_field_revision} » Upgrade path: Clean up deleted revisions from {node_field_revision}
Berdir’s picture

Status: Active » Needs review
FileSize
2.76 KB

Here's a first patch that does this.

Tested this locally with a node with some deleted revisions that also had paragraphs, so two entity types with revisions. I also set the batch size to 1 to test that this works.

Downside is that could be fairly slow on a site with a lot of nodes, I'll test it soon on a big site.

Status: Needs review » Needs work

The last submitted patch, 5: delete-stale-revision-data-2869568-5.patch, failed testing.

Berdir’s picture

Version: 8.3.x-dev » 8.4.x-dev
Status: Needs work » Needs review
FileSize
2.76 KB

wrong core version.

This is a bit interesting, actually, wondering how we're going to add this to 8.3 and 8.4, due to the different update function number, so most/all sites would end up running it twice? We could add it as the same 83xx update in 8.4 as well maybe?

Status: Needs review » Needs work

The last submitted patch, 7: delete-stale-revision-data-2869568-5.patch, failed testing.

Berdir’s picture

Status: Needs work » Needs review
Berdir’s picture

Berdir’s picture

Berdir’s picture

Did test the update function an site with 600k nodes. Worked fine but only found a handful of rows to delete, clearly deleting revisions is not done often on that site.

The query is pretty slow, took about 2.4s, so if you have a look of deleted revisions on a site, this might take a considerable amount of time. Without the order, it was about 0.9s, with just the sort on nid, it was about 1.1s. Which is actually enough for what's needed here (optimize the deletions. It might also be possible to write a delete query which uses a set of OR conditions but not sure if that's worth the complexity.

The last submitted patch, 10: delete-stale-revision-data-2869568-10.patch, failed testing.

The last submitted patch, 10: delete-stale-revision-data-2869568-10-test-only.patch, failed testing.

The last submitted patch, 11: delete-stale-revision-data-2869568-11.patch, failed testing.

dawehner’s picture

+++ b/core/modules/system/system.install
@@ -1927,3 +1927,68 @@ function system_update_8400(&$sandbox) {
+    $sandbox['current'] = 0;
...
+  $entity_type_id = $sandbox['entity_type_ids'][$sandbox['current']];
...
+    $sandbox['current']++;

Using a number to reference to an entity type is a bit weird, to say the least. Maybe renaming 'current' to something more descriptive could help.

Berdir’s picture

This is exactly the same logic as in system_update_8400(). Agreed that it's a bit weird, but it's a list of entity type ids with keys and this is the key. We could do something like current_key. But I think it's a pretty nice way of looping through that list I think.

dagmar’s picture

Some small comments in addition to to the two messages from the syntax checker:

core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
line 5	Unused use statement
core/modules/system/system.install
1971	Concat operator must be surrounded by a single space
  1. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,86 @@
    +    var_dump($result);
    

    var_dump here

  2. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,86 @@
    +
    +
    

    Two extra lines here

  3. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,68 @@ function system_update_8400(&$sandbox) {
    +  $query = \Drupal::database()->select($revision_data_table, 'rd');
    

    $database is defined before, we could use that right?

  4. +++ b/core/modules/system/tests/fixtures/update/drupal-8.entity-revision-data-cleanup-2869568.php
    @@ -0,0 +1,33 @@
    + * Contains database additions to
    + * drupal-8.filled.standard.php.gz for testing the
    + * upgrade path of https://www.drupal.org/node/2869568.
    

    This can fit into two lines.

Berdir’s picture

Thanks for the reviews. Cleaned that up and added some more comments.

Status: Needs review » Needs work

The last submitted patch, 19: delete-stale-revision-data-2869568-19.patch, failed testing.

Berdir’s picture

Testbot, I'm so very sorry.

dagmar’s picture

+++ b/core/modules/system/system.install
@@ -1927,3 +1927,78 @@ function system_update_8400(&$sandbox) {
+  if (!isset($sandbox['current'])) {
+    // This must be the first run. Initialize the sandbox.
+    $sandbox['current_key'] = 0;

Is this correct? you are using $sandbox['current'] inside the if() but $sandbox['current_key'] in the rest of the code.

Also, would be nice to trigger the tests on Sqlite and PostgreSQL just to be sure this work fine in all the backends.

Berdir’s picture

#NotMyDay ;)

It works for most tests as they only have one matching entity type, so we're finished after one round anyway. But yeah, obviously it is going to cause another endless loop on at least some tests.

The last submitted patch, 21: delete-stale-revision-data-2869568-20.patch, failed testing.

dagmar’s picture

Status: Needs review » Needs work

Thanks Berdir. This is almost RBTC for me, but I have some extra comments that in my opinion can improve the code quality.

  1. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,82 @@
    +  /**
    +   * The state service.
    +   *
    +   * @var \Drupal\Core\State\StateInterface
    +   */
    +  protected $state;
    

    I can't find where this is used. I think we can delete it.

  2. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,82 @@
    +    // Ensure the correct rows were deleted and only those.
    

    Would be nice to have at least one more revision "not the default" and ensure is not deleted.

  3. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,78 @@ function system_update_8400(&$sandbox) {
    +    $definitions = array_filter($entity_type_manager->getDefinitions(), function (EntityTypeInterface $entity_type) use ($entity_definition_update_manager) {
    +      if ($entity_type = $entity_definition_update_manager->getEntityType($entity_type->id())) {
    +        return $entity_type->getKey('revision') && $entity_type->getRevisionDataTable() && $entity_type->getRevisionTable();
    +      }
    +      return FALSE;
    +    });
    

    Sorry but this seems a bit cryptic to me. Specially the return with all those conditions. Any chance you can make it more clear?

Berdir’s picture

1. Yeah, all those properties and the trait was copied, not needed indeed.
2. 9 is actually not the default revision, ther's also 10. I've added asserts for 10 now as well, which also has translations.
3. Not exactly sure what the to change, this is basically exactly the same pattern as in the update function above, I added some more comments for now.

Status: Needs review » Needs work

The last submitted patch, 26: delete-stale-revision-data-2869568-26.patch, failed testing.

Berdir’s picture

Status: Needs work » Needs review

That fail was unrelated.

dagmar’s picture

Status: Needs review » Needs work

Thanks Berdir. Some final comments.

  1. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,50 @@
    +    debug($result);
    

    Extra debug here.

  2. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,81 @@ function system_update_8400(&$sandbox) {
    +  // Initialize the sandbox. Store a list of entity types that need to be
    +  // cleaned up in a list, then keep track of the current entity type by
    +  // its numeric index.
    

    This can fit into:

        // Filter the entity types for those that need to be cleaned up, they need
        // to exist already, have a revision key and a revision data and revision
        // table.
  3. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,81 @@ function system_update_8400(&$sandbox) {
    +    $definitions = array_filter($entity_type_manager->getDefinitions(), function (EntityTypeInterface $entity_type) use ($entity_definition_update_manager) {
    +      if ($entity_type = $entity_definition_update_manager->getEntityType($entity_type->id())) {
    +        return $entity_type->getKey('revision') && $entity_type->getRevisionDataTable() && $entity_type->getRevisionTable();
    +      }
    +      return FALSE;
    +    });
    

    I think this can be simplified to

    $definitions = array_filter($entity_type_manager->getDefinitions(), function (EntityTypeInterface $entity_type) use ($entity_definition_update_manager) {
      $entity_type = $entity_definition_update_manager->getEntityType($entity_type->id();
      return !empty($entity_type) && $entity_type->getKey('revision') && $entity_type->getRevisionDataTable() && $entity_type->getRevisionTable();
    });
    
Berdir’s picture

This is getting embarassing, thanks for all the reviews.

Fixed 1 and 2, I'm not sure that your suggestion for 3 is simpler, I kind of like the additional structure of my approach and it is the same as the one from the update function above.

I also talked to @alexpott and he said we only need to add this to 8.4.x and not backport to 8.3.x unless we have reports about those inconsistencies breaking sites.

dagmar’s picture

Status: Needs review » Reviewed & tested by the community

I tested this from creating a node in 8.3.x, deleting some revisions, upgrading to 8.4.x with the patch and running the updates. Is working as advertised.

tstoeckler’s picture

Status: Reviewed & tested by the community » Needs review
  1. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,49 @@
    +    $result = $connection->query('SELECT nid, vid FROM {node_field_revision} WHERE nid = :nid', ['nid' => 8])->fetchAll();
    +    $result = $connection->query('SELECT nid, vid FROM {node_field_revision} WHERE nid = :nid AND vid = :vid', ['nid' => 8, 'vid' => 8])->fetchAll();
    +    $this->assertEqual($result, [(object) ['nid' => '8', 'vid' => '8']]);
    

    Only one of these is actually being asserted on.

  2. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,81 @@ function system_update_8400(&$sandbox) {
    +        return $entity_type->getKey('revision') && $entity_type->getRevisionDataTable() && $entity_type->getRevisionTable();
    

    Not sure this is correct due to the fallback we do in SqlContentEntityStorage. I would think that entity types that do not specify a revision data table but are revisionable and translatable still suffer from this.

  3. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,81 @@ function system_update_8400(&$sandbox) {
    +  // Get the current entiy type. Fetch 100 records that should be deleted. Order
    ...
    +    ->range(0, 100)
    

    entiy -> entity

    Also, shouldn't this use $settings['entity_batch_updates'] instead of hardcoding 100?

  4. +++ b/core/modules/system/system.install
    @@ -1927,3 +1927,81 @@ function system_update_8400(&$sandbox) {
    +      ->condition($id_field, $id)
    

    Why do we need the ID? Shouldn't revision IDs be unique regardless of IDs?

Berdir’s picture

Well, as I said in #30, embarassing ;)

1. The first line was a copy & paste error, removed.
2. I was wondering about the falback, yes. I rewrote it a bit looking for revisionable and translatable but also making sure that those tables really exist in case your site is in a weird state.
3. .. entity is the hardest word...
4. Somehow that fact doesn't want to stay in my brain. Of course and that also means we can considerably simplify the update function.

Especially given 4, I'm not sure we should respect entity_update_batch_size. We are technically not doing entity updates but just raw delete queries and now only a single delete query for those 100 records. I'm even wondering if we want to increase that amount further now to 200 or so. I suppose we could use the setting with a different default but new sites have it by default in settings.php. Thoughts?

Now I'm bold and I'll upload the patch without re-running the tests locally, lets see how that goes :)

Status: Needs review » Needs work

The last submitted patch, 33: delete-stale-revision-data-2869568-33.patch, failed testing.

Berdir’s picture

tstoeckler’s picture

Status: Needs review » Reviewed & tested by the community
+++ b/core/modules/system/system.install
@@ -1943,14 +1943,27 @@ function system_update_8401(&$sandbox) {
+      return $database->schema()->tableExists($revision_table) && $database->schema()->tableExists($revision_data_table));

Nice!!!

Yeah you're right regarding entity_update_batch_size. Not sure if we should increase it to 200, but as you already point out above, while a lot of sites may have thousands or millions of revisions, I don't think many sites will have thousands or millions of deleted revisions. So I don't think it's a big deal either way.

Thanks!!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, 35: delete-stale-revision-data-2869568-35.patch, failed testing.

Berdir’s picture

Status: Needs work » Reviewed & tested by the community

Random fail?

Wim Leers’s picture

Issue summary: View changes
Issue tags: +data integrity
  1. Did test the update function an site with 600k nodes. Worked fine but only found a handful of rows to delete, clearly deleting revisions is not done often on that site.

    :O \o/ Thanks!

  2. Patch looks great.
  3. Updated IS.
  4. I wonder if this needs a CR, because for some people, this could mean a huge drop in database size (or at least table size), which can be … pretty scary?

  • catch committed 9a16601 on 8.4.x
    Issue #2869568 by Berdir, dagmar, tstoeckler: Upgrade path: Clean up...
catch’s picture

Status: Reviewed & tested by the community » Fixed

I don't think this needs a CR, the table size is going to be significantly larger than the data tables after the update which is the main thing.

I thought about test coverage with a non-node entity type, but I think it's reasonable to test just with node here.

Committed 9a16601 and pushed to 8.4.x. Thanks!

  • xjm committed 52ca4cc on 8.4.x
    Revert "Issue #2869568 by Berdir, dagmar, tstoeckler: Upgrade path:...
xjm’s picture

Status: Fixed » Needs work

This is failing on postgres (or it did at least once), so I've reverted it:
https://www.drupal.org/pift-ci-job/693265

Also, I had to go back and find and check on https://www.drupal.org/pift-ci-job/675973 as well. It's not the same but it might have been and would have meant a different way of approaching the fail. :) (@Berdir, when there are suspected random fails, please link the failing result and check #2829040: [meta] Known intermittent, random, and environment-specific test failures.)

In general, we really should test things that touch storage tables against all databases before commit. I'll queue a postgres test.

Thanks!

xjm’s picture

Also, should this issue be critical?

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.0-alpha1 will be released the week of July 31, 2017, which means new developments and disruptive changes should now be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vijaycs85’s picture

Status: Needs work » Needs review
FileSize
7.25 KB

Had to reroll the patch again 8.5.x and it is green fails on PHP 7 & PostgreSQL 9.1

Entity.Drupal\system\Tests\Entity\Update\SqlContentEntityStorageRevisionDataCleanupTest
✗	
testRevisionDataCleanup
fail: [Other] Line 45 of core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php:
Value array (
  0 => 
  stdClass::__set_state(array(
     'nid' => '8',
     'vid' => '10',
     'langcode' => 'en',
  )),
  1 => 
  stdClass::__set_state(array(
     'nid' => '8',
     'vid' => '10',
     'langcode' => 'es',
  )),
) is equal to value array (
  0 => 
  stdClass::__set_state(array(
     'nid' => '8',
     'vid' => '10',
     'langcode' => 'es',
  )),
  1 => 
  stdClass::__set_state(array(
     'nid' => '8',
     'vid' => '10',
     'langcode' => 'en',
  )),
).
✓		- runUpdates
dagmar’s picture

It seems we have to be explicit about the order of the records. Lets try with this.

Status: Needs review » Needs work

The last submitted patch, 47: 2869568-47.patch, failed testing. View results

dagmar’s picture

Now that everything fails consistently, this patch should fix the issue.

amateescu’s picture

  1. +++ b/core/modules/system/src/Tests/Entity/Update/SqlContentEntityStorageRevisionDataCleanupTest.php
    @@ -0,0 +1,48 @@
    +   * Tests that stale rows in the revision data table are deleted.
    +   */
    +  public function testRevisionDataCleanup() {
    

    We could put a @see system_update_8404() in this method's doc block.

  2. +++ b/core/modules/system/system.install
    @@ -2042,3 +2042,86 @@ function system_update_8403() {
    +      if (!$entity_type->getKey('revision') || !$entity_type->isRevisionable() || !$entity_type->isTranslatable()) {
    

    The first check here for getKey() seem unnecessary because isRevisionable() does the same check internally.

  3. +++ b/core/modules/system/system.install
    @@ -2042,3 +2042,86 @@ function system_update_8403() {
    +  // Get the current entity type. Fetch 100 records that should be deleted. Order
    

    Nit: over 80 chars.

  4. +++ b/core/modules/system/system.install
    @@ -2042,3 +2042,86 @@ function system_update_8403() {
    +  // If there are less than 100 rows, the entity type was cleaned up, move on
    +  // to the next one.
    

    Another nit: It looks like "to" can be moved above without exceeding the 80 chars limit.

  5. +++ b/core/modules/system/tests/fixtures/update/drupal-8.entity-revision-data-cleanup-2869568.php
    @@ -0,0 +1,32 @@
    + * the upgrade path of https://www.drupal.org/node/2869568.
    

    I think we should mention the actual name of the update function here (system_update_8404()) instead of a d.o link.

dagmar’s picture

amateescu’s picture

Status: Needs review » Reviewed & tested by the community

Perfect! :)

catch’s picture

Status: Reviewed & tested by the community » Needs review

Since it's a batched update, do we want to add 101 test rows to the data for the update test to double check the batching works?

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.0-alpha1 will be released the week of January 17, 2018, which means new developments and disruptive changes should now be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.6.x-dev » 8.7.x-dev

Drupal 8.6.0-alpha1 will be released the week of July 16, 2018, which means new developments and disruptive changes should now be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

vickey’s picture

Status: Needs review » Needs work

Removed irrelevant comments.

Berdir’s picture

> Please do the needful.

From https://en.wiktionary.org/wiki/needful:

Commonly found in phrases such as "please do the needful", which occur commonly in Indian English but are held as archaic in other dialects. Global interactions between English speakers have to some extent led to these phrases being seen as stereotypical of Indian English and parodied by speakers of other dialects.

I'd suggest to avoid that sentence, it sounds very demanding and "not nice" to me.

I see how it would be a problem for you, but this is a patch that was not committed, so not sure why you even noticed this, there isn't really a reason to apply this to a site?

vickey’s picture

Kindly excuse me. I have removed my comments, will post it in relevant issue.

Version: 8.7.x-dev » 8.8.x-dev

Drupal 8.7.0-alpha1 will be released the week of March 11, 2019, which means new developments and disruptive changes should now be targeted against the 8.8.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.0-alpha1 will be released the week of October 14th, 2019, which means new developments and disruptive changes should now be targeted against the 8.9.x-dev branch. (Any changes to 8.9.x will also be committed to 9.0.x in preparation for Drupal 9’s release, but some changes like significant feature additions will be deferred to 9.1.x.). For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 8.9.x-dev » 9.1.x-dev

Drupal 8.9.0-beta1 was released on March 20, 2020. 8.9.x is the final, long-term support (LTS) minor release of Drupal 8, which means new developments and disruptive changes should now be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

Version: 9.1.x-dev » 9.2.x-dev

Drupal 9.1.0-alpha1 will be released the week of October 19, 2020, which means new developments and disruptive changes should now be targeted for the 9.2.x-dev branch. For more information see the Drupal 9 minor version schedule and the Allowed changes during the Drupal 9 release cycle.

Version: 9.2.x-dev » 9.3.x-dev

Drupal 9.2.0-alpha1 will be released the week of May 3, 2021, which means new developments and disruptive changes should now be targeted for the 9.3.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.3.x-dev » 9.4.x-dev

Drupal 9.3.0-rc1 was released on November 26, 2021, which means new developments and disruptive changes should now be targeted for the 9.4.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.0-alpha1 was released on May 6, 2022, which means new developments and disruptive changes should now be targeted for the 9.5.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.5.x-dev » 10.1.x-dev

Drupal 9.5.0-beta2 and Drupal 10.0.0-beta2 were released on September 29, 2022, which means new developments and disruptive changes should now be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

quietone’s picture

Status: Needs work » Needs review
FileSize
5.74 KB
7.93 KB

Just updating the patch.

quietone’s picture

Title: Upgrade path: Clean up deleted revisions from {node_field_revision} » Add upgrade path to clean up deleted revisions from node_field_revision
FileSize
3.38 KB
8.93 KB

Added another 100 rows to the test data (#53) and more assertions on the data.

smustgrave’s picture

Status: Needs review » Reviewed & tested by the community

Applied patch #69
Ran updb and that ran without issue.

Tests all green and was previously RTBC #52 so restoring that.

quietone’s picture

Issue tags: +D8 upgrade path

  • catch committed ee9fdd36 on 11.x
    Issue #2869568 by Berdir, dagmar, quietone, vijaycs85, catch, tstoeckler...
catch’s picture

Status: Reviewed & tested by the community » Fixed

Changes in #69 look good, committed/pushed to 11.x, thanks!

znerol’s picture

Small follow-up. The test added here doesn't run #3394186: SqlContentEntityStorageRevisionDataCleanupTest does not run.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.