monotone-devel
[Top][All Lists]
Advanced

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

[Monotone-devel] Re: Error in Pull


From: graydon hoare
Subject: [Monotone-devel] Re: Error in Pull
Date: Tue, 08 Feb 2005 13:44:43 -0500
User-agent: Mozilla Thunderbird 1.0 (X11/20041206)

Paul Snively wrote:

monotone: fatal: std::logic_error: database.cc:865: invariant 'I(i->second().size() >= use)' violated

whoops! try applying this.

-graydon

--- database.cc
+++ database.cc
@@ -856,10 +856,9 @@
% rand() % rand() % rand() % rand() % rand()).str();
         std::map<hexenc<id>, base64< gzip<data> > >::const_iterator i;
         i = cache.lower_bound(hexenc<id>(key));
-        if (i != cache.end())
+        if (i != cache.end() && i->second().size() >= use)
           {
             L(F("version cache expiring %s\n") % i->first);
-            I(i->second().size() >= use);
             use -= i->second().size();
             cache.erase(i->first);
           }




reply via email to

[Prev in Thread] Current Thread [Next in Thread]