We currently have code in ContentEntity::loadMultiple() to remove items that could not be loaded from tracking, as kind of a fail-safe if something goes wrong during entity deletion.
However, since that's (very probably) something which is common to all data sources, I think it actually makes much more sense to move that code to the index's loadMultipleItems() method.
There's also an @todo in that method to the same effect.
Estimated Value and Story Points
This issue was identified as a Beta Blocker for Drupal 8. We sat down and figured out the value proposition and amount of work (story points) for this issue.
Value and Story points are in the scale of fibonacci. Our minimum is 1, our maximum is 21. The higher, the more value or work a certain issue has.
Value : 1
Story Points: 3
| Comment | File | Size | Author |
|---|---|---|---|
| #15 | 2574589-15--remove_unloadable_items.patch | 83.81 KB | drunken monkey |
| #15 | 2574589-15--remove_unloadable_items--tests_only.patch | 78.76 KB | drunken monkey |
Comments
Comment #2
nick_vhComment #3
drunken monkeyHere is a first attempt, complete with test.
Comment #6
drunken monkeyLinking a follow-up for simplifying the test structure a bit.
Comment #9
drunken monkeyLooks like #2693613: Correctly react when content entity datasource languages are changed finally made itself known.
Comment #10
drunken monkeyDependency got moved to #2574611: Unify our two task systems. Which should soon be committed, finally enabling us to untangle this whole dependency chain.
Comment #11
drunken monkeyThe other issue got committed, so here is a re-roll for this one – including #2693593: Merge search_api_test and search_api_test_backend modules and some further test module merging.
Comment #14
borisson_Overall, I think this looks great and I only have nitpicks.
I had to read this line 4 times to understand what's going on, but I don't think we can make this easier to read so let's keep it like this.
This is really clever, @drunken monkey++
We only need that module once.
This can also be
$this->assertEmpty($items);but I don't think that makes a big difference. There's a couple other places in the patch where we can change this as well.I think we can remove one of those lines.
Comment #15
drunken monkeyOh god, yes, this is aweful. But that's why I put a comment above it, so, as you say, I think we can just leave it like this.
So, do you think we should change it? I find it a bit clearer like this, but both would be OK for me.
Revised patch attached.
Comment #18
borisson_I don't have strong opinions either way.
Comment #20
drunken monkeyOK, thanks for reviewing!
Committed.