Problem/Motivation
node_access_rebuild_progressive_process_chunk() enters an infinite loop when a node exists in the node table but cannot be loaded via Node::load(). This happens when the Trash module is enabled in my setup. Trashed nodes remain in the node table but loadMultiple() filters them out.
Steps to reproduce
1. Install and enable the Trash module
2. Create a node and trash it (soft-delete)
3. Run drush node-access-rebuild-progressive
4. The command hangs indefinitely when it reaches the trashed node
Cause
In node_access_rebuild_progressive_process_chunk(), the $current variable (used to track progress) is only updated inside the foreach ($nodes as $node) loop. When loadMultiple() returns an empty array (because the node is trashed/unloadable), the loop body never executes, $current is never advanced, and the same nids are fetched on the next iteration.
Comments
Comment #2
shelaneI just merged a changes that doesn't do loadmultiple but loads each node individually in the foreach loop. Can you check if this fixed your issue?