Closed (fixed)
Project:
Nodeblock
Version:
7.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 Apr 2012 at 10:24 UTC
Updated:
1 Feb 2013 at 16:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
pfrenssenThis is quite a bit worse. The _block_rehash() is called on every hook_node_insert(), hook_node_update() and hook_node_delete(). Not just for nodeblocks, but for all nodes. On a highly trafficked site with 180 blocks I'm getting integrity constraint violations because of this.
If this condition occurs on node save this will probably cause the node not to be saved successfully, so this might cause data loss. This warrants a major or even critical priority for this issue.
I am not so fond of the patch though. There's no need to check both conditions to see whether _block_rehash() needs to be run, and you forgot to address the one in _nodeblock_insert_update().
Comment #2
pfrenssenHere's my take on it.
Comment #3
Johnny vd Laar commentedCommitted a fix but modified it a little bit because of issue #1432726: Remove blocks from the block tables when deleting a node we don't need a full block rehash on a node delete. We just need to remove the entries that were already created.
http://drupalcode.org/project/nodeblock.git/commit/94b131e