[Planetlab-devel] site_id in slices - need to remove the NOT
NULL constraint
Mark Huang
mlhuang at CS.Princeton.EDU
Tue Nov 14 10:25:44 EST 2006
Thierry Parmentelat wrote:
> there's a restriction on site_ids in the slices table.
> NOT NULL
> like there was in the nodes table
> except that this time there's also an index on site_id's so I was unsure
> whether I could clear the restriction
> right now I'm shoving '1' in site_id just so I can go on, but of course
> that's not gonna make it.
I assume you're trying to put foreign slices in the slices table just like
foreign nodes are in the nodes table? If so, yes, I think you can remove the
site_id field, but grep through the code and fix any assumptions first. Add
"WHERE site_id is NOT NULL" to the slices.site_id index, and verify with EXPLAIN
ANALYZE that GetSites() uses it (you may have to disable sequential scans with
"set enable_seqscan f").
I really think that ForeignNodes and ForeignSlices are unnecessary objects,
unless you have further plans for making them special kinds of objects; for
instance, a subclass of a NonAuthoritativeCache class, or something like that.
Can you explain what your plans are?
--Mark
More information about the Devel
mailing list