Comments

Dave Reid’s picture

Status: Active » Needs review
FileSize
4.85 KB
PASSED: [[SimpleTest]]: [MySQL] 525 pass(es). View
Dave Reid’s picture

FileSize
5.02 KB
PASSED: [[SimpleTest]]: [MySQL] 525 pass(es). View

Revised version.

Dave Reid’s picture

FileSize
5.04 KB
FAILED: [[SimpleTest]]: [MySQL] Unable to apply patch 2417027-rebuild-queue_1.patch. Unable to apply patch. See the log in the details link for more information. View

And last revision.

Dave Reid’s picture

Version: 7.x-2.x-dev » 8.x-1.x-dev
Assigned: Dave Reid » Unassigned
Status: Needs review » Patch (to be ported)

Committed #3 to 7.x-2.x.

  • Dave Reid committed 696ab93 on 7.x-2.x
    Issue #2417027 by Dave Reid: Added support for updating links and...

Status: Patch (to be ported) » Needs work

The last submitted patch, 3: 2417027-rebuild-queue.patch, failed testing.

Dave Reid’s picture

Status: Needs work » Patch (to be ported)

  • Dave Reid committed 73fbb26 on 7.x-2.x
    Issue #2417027: Added flag to reset xmlsitemap_rebuild_needed.
    
Dave Reid’s picture

Issue summary: View changes
Dave Reid’s picture

Issue summary: View changes

FYI some additional commits were also added to select specific link types in the rebuild process, that should also be ported with the above commits:
http://drupalcode.org/project/xmlsitemap.git/commit/dbcf508
http://drupalcode.org/project/xmlsitemap.git/commit/2f8da5e

marvin_B8’s picture

Status: Patch (to be ported) » Needs review
FileSize
4.26 KB

Patch for Drupal 8 but without #10 implementations.

Andre-B’s picture

+++ b/xmlsitemap.drush.inc
@@ -30,9 +30,94 @@ function xmlsitemap_drush_command() {
+    $query = \Drupal::entityQuery($entity_type_id);
+    $query->addTag('xmlsitemap_link_bundle_access');
+    $query->addTag('xmlsitemap_rebuild');
+    $query->addMetaData('entity_type_id', $entity_type_id);
+    $query->addMetaData('entity_info', $info);
+
+    if ($types = xmlsitemap_get_link_type_enabled_bundles($entity_type->id())) {
+      $bundle_name = $entity_type->getKey('bundle');
+      $query->condition($bundle_name, $types, 'IN');
+    }
+    else {
+      // If no enabled bundle types, skip everything else
+     continue;
+    }
+
+    $results = $query->execute();

This entityQuery might already run out of memory before even having the chance to process the chunks in batches.

Andre-B’s picture

Status: Needs review » Needs work
Andre-B’s picture

Queuing got me as far as indexing 120k links now for that sitemap. Next: drush xmlsitemap-regenerate dies at following memory_limits: 512M, 1024M, 2048M, 4096M

(some) error messages:

Fatal error: Allowed memory size of 1073741824 bytes exhausted (tried to allocate 9201 bytes) in /docroot/core/lib/Drupal/Core/Database/Statement.php on line 59

Warning: Unknown: Drupal\Core\StreamWrapper\PublicStream::stream_write is not implemented! in Unknown on line 0
Fatal error: Allowed memory size of 2147483648 bytes exhausted (tried to allocate 8208 bytes) in /docroot/core/lib/Drupal/Core/Routing/CompiledRoute.php on line 146
Segmentation fault

Apart from taking more than half an hour it still doesn't finish. Anyways, at 4GB I gave up.