Roundup Tracker - Issues

Message2521

Author nikratio
Recipients
Date 2008-02-12.11:55:28
Message-id
In-reply-to
I was making some changes in the database using the python interface.
At some point I removed a message:

  db.msg.destroy("230")

Afterwards I iterate over all issues:

  for id in db.issue.list():
      print "Checking", id
      priority = db.issue.get(id, "priority")
      ....
      
this failed with the error:

  ..
  Checking 97
  Checking 98
  Checking 99
  
  Traceback (most recent call last):
    File "./check-tracker.py", line 118, in ?
      priority = db.issue.get(id, "priority")
    File "/home/nikratio/stow//lib/python2.4/site-packages/roundup/backends/rdbms_common.py", line 1467, in get
      d = self.db.getnode(self.classname, nodeid)
    File "/home/nikratio/stow//lib/python2.4/site-packages/roundup/backends/rdbms_common.py", line 987, in getnode
      del self.cache[self.cache_lru.pop()]
  KeyError: ('msg', '280')


I couldn't quite understand why retrieving the priority of issue 99
would result in a key error mentioning message 280. msg280 is bound to
issue17 and issue99 only has one message msg159. Nevertheless I tried
to add db.commit() after deleting the message, but the error
persisted.

However, if I only deleted the message, committed and then restarted
the script to only iterate through the issues, everything worked fine.
I therefore suspect that there is some problem with the internal
caching. 


Note: It seems that I can also reproduce this most of the time with other issues as well.
History
Date User Action Args
2009-02-03 14:22:12adminlinkissue1891883 messages
2009-02-03 14:22:12admincreate