<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
</head>
<body bgcolor="#ffffff" text="#000000">
Hi,<br>
<br>
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:<br>
<ol>
  <li>mogadm domain add xxx</li>
  <li>mogadm domain delete xxx</li>
  <li>mogadm domain add yyy</li>
  <li>mogadm domain list (several times)</li>
</ol>
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:<br>
<br>
--code begin--<br>
sub invalidate_cache {<br>
...<br>
%id2name=();<br>
%name2id=();<br>
%singleton=(); # XXX: this is newly added<br>
...<br>
--code end--<br>
<br>
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?<br>
<br>
</body>
</html>