[openstack-dev] [ceilometer][all] the max length of an id

gordon chung gord at live.ca
Fri Jun 26 15:00:40 UTC 2015


hi,

recently we added a change in Ceilometer to lower the size of our id 
fields in our storage model[1]. the reason we did this was because the 
original size of varchar(255) we assigned to ids were so large that if 
we wanted to generate some of our larger constraint requirements, it 
would hit index limits of the sql backend.

[disclaimer: i'm not an expert on uuid] typically, a uuid is 36 chars 
long, according to google, somtimes a bit longer. in Ceilometer, we 
lowered our size to varchar(128) to get some buffer space, this 
apparently was too restrictive on the ids we use in OpenStack as our 
change started breaking things[2].

so for discussion, i'm hoping to get some conditions (standardisation?) 
on how we generate ids. most people seem to be using uuid4() to generate 
ids -- this seems to be logical. i think the problem seems to be when we 
add namespacing prefix. can we set a cap on namespace prefix? say 
32char? possibly [<optional 32char prefix>:]uuid4()?

just brainstorming, but my main goal would be to have ids a reasonable 
size (and hopefully consistent).

[1] https://bugs.launchpad.net/ceilometer/+bug/1353039
[2] https://bugs.launchpad.net/ceilometer/+bug/1468916

cheers,

-- 
gord




More information about the OpenStack-dev mailing list