Follow up to:

#1606794: Implement new routing system
#1786460: Add the lock API to the DIC

The MatcherDumper class needs to be adjusted to use the locking framework to avoid race conditions on rebuild. That must be done via pure injection so that the MatcherDumper is still unit testable.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Crell’s picture

Priority: Normal » Critical

Per catch's request.

sun’s picture

Component: base system » routing system
catch’s picture

Status: Postponed » Active

No reason to postpone this. Also #1642062: Add TempStore for persistent, limited-term storage of non-cache data adds the lock system to the DIC.

Berdir’s picture

And it has been commited now, so even less reasons to postpone it :)

Berdir’s picture

Assigned: Unassigned » Berdir

I actually have an almost finished patch for this.

Berdir’s picture

Status: Active » Needs review
FileSize
2.78 KB
2.78 KB

Should be something like this I guess?

Passes the lock into the service, implementation is taken from menu_rebuild and adjusted.

Edit: Accidental double upload, it's the same file.

Status: Needs review » Needs work

The last submitted patch, router-rebuild-lock-1798222-6.patch, failed testing.

Crell’s picture

That looks right to me visually. No idea why testbot disagrees.

Berdir’s picture

Upgrade tests. I guess we have a another service definition of router.builder in update.php which needs to be updated as well.

Berdir’s picture

Status: Needs work » Needs review
FileSize
891 bytes
3.65 KB

This should fix the tests.

Crell’s picture

Status: Needs review » Reviewed & tested by the community

So it does.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Patch looks consistent with what we do in menu.inc in D7 today.

Committed and pushed to 8.x. Thanks!

Status: Fixed » Closed (fixed)

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

Anonymous’s picture

Issue summary: View changes

Updated issue summary.