Opened 12 years ago

Closed 12 years ago

#103 closed (fixed)

the slice table in gmoc-db2 has unique key uuid, where the unique key should be name + uuid

Reported by: chaos@bbn.com Owned by: chaos@bbn.com
Priority: minor Milestone: gmoc.py data submission debugging
Component: Database Version:
Keywords: Cc:
Dependencies:

Description

The slice table in gmoc-db2 is:

CREATE TABLE `slice` (
  `slice_id` int(11) NOT NULL auto_increment,
  `name` varchar(128) NOT NULL,
  `last_update` int(10) NOT NULL default '0',
  `uuid` varchar(128) default NULL,
  `created` int(11) NOT NULL,
  `expires` int(11) NOT NULL,
  PRIMARY KEY  (`slice_id`),
  UNIQUE KEY `uuid` (`uuid`)

However, uuids are not globally unique --- they're only unique at a given entity (SA in this case). The name field here contains a slice URN, which should be globally unique at a given time, but not necessarily over time. Therefore, for global uniqueness over time, the combination of name (URN) and uuid is needed.

A reminder which may be relevant here: when aggregates refer to a slice, they may report only the slice URN and not the UUID, because they may not know it. So any changes to this table should retain the current (GEC14) submission behavior, in which the scripts resolve a stub slice by looking up the name and using the most recent slice with that name.

Change History (3)

comment:1 Changed 12 years ago by chaos@bbn.com

Owner: changed from somebody to chaos@bbn.com
Status: newassigned

The slice table now has:

  UNIQUE KEY `name` (`name`,`uuid`)

I want to verify that two slices with the same URN and different UUIDs are treated correctly. In order to check this, i need to test with a short-duration slice on pgeni1, so that'll take an hour. I'm working on it now, using the slice with URN:

urn:publicid:IDN+pgeni1.gpolab.bbn.com+slice+ecgtest10

comment:2 Changed 12 years ago by sedwards@bbn.com

Status: assignednew

comment:3 Changed 12 years ago by chaos@bbn.com

Resolution: fixed
Status: newclosed

Here are those two slices:

  (2670,'urn:publicid:IDN+pgeni1.gpolab.bbn.com+slice+ecgtest10',1349209473,'f11febbe-0cc7-11e2-adf1-000c29b09582',1349224365,1349227965,''),
  (2671,'urn:publicid:IDN+pgeni1.gpolab.bbn.com+slice+ecgtest10',1349214938,'d894c5aa-0cd3-11e2-adf1-000c29b09582',1349229478,1349233078,'');

Looks good.

Note: See TracTickets for help on using tickets.