In this blog post I explain why running \Drupal::entityDefinitionUpdateManager()->applyUpdates() in update hooks is very bad. I've already seen this a few times now, and today it was one of times it caused a problem during updating a site.
Drupal's API has a huge number of very useful utitlity classes and functions, especially in Drupal 8. Although the API docs are great, it's rather impossible to always find every little feature. Today I want to show you the Random utility class, which I've nearly overseen and found rather by accident.