We have moved to GitHub Issues
Created by Sebastiaan Janssen 07 Nov 2017, 12:47:23 Updated by Will Hancock 23 Nov 2017, 11:04:11Tags: Unscheduled
Subtask of: U4-9609
The sort dialog currently allows you to click the "Save" button as many times as you want. When you do this in rapid succession with a large number of nodes being sorted, it is possible that some property data gets saved as blank data.
The cause: as we are sorting (1st sort) we are updating content, so updating the cache, and then in the meantime we start reading from the cache (2nd sort) - bad things can happen.
First no-brainer commit: don't allow the Save button to be clicked more than once. https://github.com/umbraco/Umbraco-CMS/commit/87ace12a4f06ab1d147abd58fb6d961c550dd755
Looks like there's already a lock in the
ContentService.Sort method though so I'm not sure now how this property data corruption could happen.
Aha, but nodeSorter.asmx.cs gets all the content items before it sends it off to the sort method, that's outside of the lock and could be getting partially populated caches.
I don't want to add an additional lock to nodeSorter.asmx.cs because we might end up in a deadlock eventually. It would be best to get the IContent items from a list of Ids in the locked
ContentService.Sort method so that all data access is done within the lock and the data should not change will reading it.
So I added an additional method for this, which should be used everywhere. I guess we should obsolete the method that accepts an
IEnumerable<IContent> as it is not safe?
I moved both usages of the old method to the new method.
doing the whole thing in 1 place (content service) is indeed how it needs to be done, else anything bad can happen
Cheers! Merged up to 7.7.5 as well.
Thanks @sebastiaan Do you know which version of the UI this has gone into? Just 7.7.5?
We reported this in our 7.5.14 - looking to upgrade in the new year now.
edit; Just read this is due for 7.7.5 and 7.6.12, so we won't see this in 7.5?
Backwards Compatible: True
Due in version: 7.7.5, 7.6.12
Sprint: Sprint 72