Re: [PATCH 1/4] Index hashes by UUID instead of name

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/18/2010 01:08 PM, Matthias Bolte wrote:
> 2010/6/17 Jiri Denemark <jdenemar@xxxxxxxxxx>:
>> Per-connection hashes for domains, networks, storage pools and network
>> filter pools were indexed by names which was not the best choice. UUIDs
>> are better identifiers, so lets use them.
> 
> Well, the comments say the same: "UUID is better than the name has
> key", but why? Because they are more random than the name and might
> result in less collisions in the hash?
> 

A while ago, there was a bug with libvirt leaking domain references.
This caused hash table confusion if a user did:

- create VM named 'foobar'
- whoops, messed up config. delete VM 'foobar'
- create new VM named 'foobar'
- createXML errors obscurely

Leak fixed, solve the problem, but it shouldn't have caused issues in
the first place as long as UUID is different. Granted this change just
transfers that possible issue to UUIDs, possible in the case of define
$xml; undefine $xmlname; define $xml  but that's probably not as useful
a usecase.

Also keying off UUID might make implementing a rename API easier.

- Cole

> Also ID, name and UUID must be unique per domain anyway.
> 
>> ---
>> Â src/datatypes.c | Â  64 +++++++++++++++++++++++++++++++------------------------
>> Â 1 files changed, 36 insertions(+), 28 deletions(-)
>>
> 
> Anyway, ACK.
> 
> Matthias
> 
> --
> libvir-list mailing list
> libvir-list@xxxxxxxxxx
> https://www.redhat.com/mailman/listinfo/libvir-list

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list



[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]