bsed / ala

Automatically exported from code.google.com/p/ala
0 stars 0 forks source link

Home page index falls out of sync due to slient deletes #447

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
Home page index falls out of sync due to slient deletes.

Project-Site associations are stored against site. Removal of a project with 
cause the removal of the project Id from the site object in the DB. A GORM 
event is then fired for the Site but not (crucially) for the Project. Hence the 
index for the homepage becomes out of sync. Similarly for additions - although 
this should be easier to fix (as we have the current set of projects to index 
on the Site).

Original issue reported on code.google.com by moyesyside on 13 Dec 2013 at 2:16

GoogleCodeExporter commented 9 years ago
I fixed the converse of this problem a week or so ago - when a user created a 
new site for a project or updated a project to include a new (existing) site it 
wasn't being updated in home page. 

Not sure how to tackle this as the Project -Site relationship is stored at the 
Site end. Deleting a site removes the relationship but how is the project then 
going to know about it - without indexing all projects again?

Original comment by nickdos on 13 Dec 2013 at 3:50

GoogleCodeExporter commented 9 years ago
Got a fix for this... uses the EventType.PreUpdate event and grabs projectIds 
by querying DB for existing data before save().

See revision 1157

Original comment by nickdos on 17 Dec 2013 at 6:00

GoogleCodeExporter commented 9 years ago
I had to comment out the indexing code that fixed this issue - see ISSUE 404

Original comment by chris.go...@gmail.com on 18 Dec 2013 at 4:36