This patch clones the indexed items, so later data alterations can modify them without risk. This patch was made in collaboration with drunken monkey.

Comments

drewish’s picture

Seems like that could mean quite a bit more memory right?

drunken monkey’s picture

StatusFileSize
new1.29 KB

Yes, but only for a short time during indexing, before the memory is reclaimed.
This revised patch even improves that by immediately unsetting all cloned items when they aren't needed anymore.

mh86’s picture

Status: Needs review » Reviewed & tested by the community

Tested patch from #2 and it looks good to me (although I haven't done any memory usage comparisons)

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

OK, committed.

jsacksick’s picture

Status: Fixed » Active

I'm not sure this is really working well, I just had an issue with the hierarchy data alteration callback.
I added a property to an entity which is more or less a copy of a taxonomy reference field, I had a problem in the getter callback because when I was trying to access the altered field the structure expected normally looks like the following :
$entity->field_name[LANGUAGE_NONE][0]['tid']
Instead of that, I had sthg like :
$entity->field_name = array( TID_VALUE => TID_VALUE .
To avoid that in my getter callback I load the entity again (unaltered) instead of the entity coming from the parameters of the getter callback.
I don't know if I'm clear enough ! Feel free to ask questions

drunken monkey’s picture

So you say this doesn't work with a custom property you added?
Did it work before the patch? Otherwise, please create a new issue.
Also, did you define a setter callback that stores the values in the proper format? Maybe that's the problem?

legolasbo’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

This issue has not seen activity in over 2,5 years. I am therefore closing this issue to clean up the issue queue. Feel free to re-open and update this issue if you feel this issue is still relevant and of importance.