In the current implementation the batch processing depends on the website using a SQL database. If a NoSQL database such as Virtuoso or MongoDB is used there will not be a base table, and the database join in \Drupal\pathauto\Plugin\pathauto\AliasType\EntityAliasTypeBase::batchUpdate() cannot be executed:

    $query = $this->database->select($entity_type->get('base_table'), 'base_table');
    $query->leftJoin('url_alias', 'ua', "CONCAT('" . $this->getSourcePrefix() . "' , base_table.$id_key) = ua.source");

This can be solved by doing 2 separate queries, one getting the list of existing URL aliases, and the other getting 25 entity IDs to process. The result of the first query can be cached in the sandbox so it only needs to be performed once.

The drawback of this approach is that doing 2 queries will be less efficient for "standard" SQL databases which I imagine is the 80% use case for the module.

Comments

pfrenssen created an issue. See original summary.

pfrenssen’s picture

I have created an implementation for Virtuoso in https://github.com/ec-europa/rdf_entity/blob/1ed63c39d0f8e2ac3e91f7fb9a4... which can be used as a basis for this feature request if there is interest from the maintainers.

berdir’s picture

Yes, aware of that limitation, this was a port from 7.x.

Note that your implementation wouldn't scale, if you have 100k's of aliases, you can't just load them all into memory. The only approach that would work generically and scale is to use entity query to batch through the entities and then get N aliases for a specific set of entities. That would of course also be very slow, especially in cases where 99k of 100k aliases already exist.

A possible approach would be to check the storage handler, if it's not the default sql implementation, then it could fall back to that. Happy to review patches, but won't have time to invest in writing it myself.

mably’s picture

@berdir should we keep this open?

mably’s picture

Status: Active » Postponed (maintainer needs more info)

I have no idea how this could be done.