Hi,

I use the MogileFS code from official svn trunk to do some test. But when I do some domain addition/deletion operations, the output of 'mogadm domain list' becomes inconsistent between different calls. This phenomenon can be repeated by following steps:
  1. mogadm domain add xxx
  2. mogadm domain delete xxx
  3. mogadm domain add yyy
  4. mogadm domain list (several times)
I thinks the problem is in the invalidate_cache() method in MogileFS::Domain module, because it forget to clean up the hash map %singleton (of_dmid(), which is called in domains(), used this hash map before trying %id2name map). After made the following changes in MogileFS::Domain::invalidate_cache(), the phenomenon doesn't show up again:

--code begin--
sub invalidate_cache {
...
%id2name=();
%name2id=();
%singleton=(); # XXX: this is newly added
...
--code end--

And I have another question: does classes belong to certain domain? If so, why delete a domain does not clean up the classes under it?

Reply via email to