Closed (works as designed)
Project:
Hosting
Version:
6.x-0.3
Component:
Code
Priority:
Critical
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
5 Oct 2009 at 22:46 UTC
Updated:
15 Aug 2013 at 17:20 UTC
While dancing around #584188: Duplicate rows in node, hosting_package tables, jonhattan had the brilliant idea of checking for orphans in the hosting_package_instance table. That issue is actually present in 0.3, not only 0.4-alpha1, so I'm opening a separate issue about this.
mysql> SELECT iid FROM hosting_package_instance WHERE rid NOT IN (SELECT nid FROM hosting_platform);
...
14945 rows in set (0.06 sec)
I get this on our prod server running 0.3. So to close off that issue (and alpha2), we should also solve that issue. Even after clearing the orphans manually, verify tasks will readd them, so this is very likely a bug in verify.
Comments
Comment #1
adrian commentedrid != platform id.
rid is either a platform id, a site id or the instance id of a specific install profile on a site.
rid is the point where package checks are done from. ie: this install profile on this platform has these packages available to it, this platform has these packages available to it. etc.
also, that table gets manipulated regularly. it does a delete * from table where rid = X and then re-imports the whole tree.
so orphans would get wiped out or are irrelevant to begin with.
Comment #2
jonhattananarcat: my thoughts in [584188#22] are wrong by the basis. Afterwards I realized I was wrong. The thing is that `rid` in `hosting_package_instance` can be three diferent things: a platform node id , a site node id or a profile **instance id**. There's a function to deal with that complexity/flexibility: `_hosting_package_instance_load()`. By the way adrian is the one that can explain it better.
Comment #3
danepowell commentedVery old issue I know, but my hosting_package_instance table was extremely bloated with orphaned entries. Here's how I solved it:
http://drupalcode.org/project/hosting_task_gc.git/commit/9a667a9