Problem/Motivation

If two people save the same configuration entity at the same time we don't use locking to ensure that one is saved and the other is rejected.
#2430219: Implement a key value store to optimise config entity lookups opens a new avenue for race conditions since saving two different configuration entities could result in missing information in the lookup key value storage.

Steps to reproduce the locking problem:

  1. Install Drupal standard
  2. Open the main menu admin (admin/structure/menu/manage/main)
  3. Add a second menu item
  4. Open the main menu admin in a second tab
  5. Change the menu items order and save
  6. Come back to your first tab
  7. Change the menu name and save
  8. You've lost the menu items order set in the second tab

Steps to reproduce the key_value storage problem:

These steps, suggested by @alexpott, are supposed to help someone whiling to write a test that demonstrate that problem.

  1. Create a test entity with a lookup key and a 'foo' base field
  2. In the test entity save method add a sleep if the 'foo' base field contains the 'bar' value
  3. In two different processes, save two different entities of this type, the first with foo=bar and the second with foo=notbar
  4. See what happens

Proposed resolution

TBD

Remaining tasks

Discuss, demonstrate, fix.

User interface changes

None.

API changes

Maybe.

Comments

DuaelFr’s picture

Issue tags: +HappyDays1506
Dom.’s picture

Can you add reproduction step on this ?

DuaelFr’s picture

Issue summary: View changes

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.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.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.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.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.