Active
Project:
Drupal core
Version:
main
Component:
configuration system
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Oct 2019 at 15:01 UTC
Updated:
17 Mar 2022 at 10:59 UTC
Jump to comment: Most recent
Comments
Comment #2
johnwebdev commentedI guess this could happen if:
a) The developers uses shared development environments (We actually did have this many years ago)
b) You have some deployment script that you trigger manually, and they are triggered concurrently
c) Automated deployments which is not run sequentially
But I am leaning towards, if needed be, documentation here, as in "Not supported".
Comment #8
rwohlebWe ran into such an issue in our production environment recently where scaling started up a number of new nodes and all were trying to import configuration. It resulted in a huge amount of configuration being deleted from the database (removal of fields, etc). My co-worker was able to reproduce this locally by injecting pauses to simulate specific timings. The general flow that seems to be possible:
While this example is using Drush, it seems like this would be an issue in any code triggering an import. The `config_import_transformer` lock will prevent concurrent transformations from trampling each other, but nothing prevents reading from storage in the middle of a transformation. Ideally the storage is completely locked while `replaceStorageContents()` is running.
Comment #9
bircherThis could have a smaller impact with #3232494: Optimise StorageCopyTrait for slow write operations
Comment #10
catchSee also #3204073: ConfigImporter acquires a lock for 30 seconds but this might not be long enough but looks like we might need to revisit the behaviour around the lock as well as just the lock length.