monotone-devel
[Top][All Lists]
Advanced

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

Re: [Monotone-devel] Absurdly long check-out duration (probable bug)


From: Timothy Brownawell
Subject: Re: [Monotone-devel] Absurdly long check-out duration (probable bug)
Date: Fri, 04 Jun 2010 16:31:40 -0500
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.9) Gecko/20100515 Icedove/3.0.4

On 06/04/2010 03:40 PM, Francis Russell wrote:
Attempting:

$ mtn db init -d mtn.db
$ mtn pull -d mtn.db monotone.ca 'net.venge.monotone.*'

with monotone 0.47 under Linux, midway though the checkout CPU usage
remained high but no more revisions came in. Seven hours later at 100%
CPU usage, I killed the process. This looks like a bug.

I tried the 0.46 Linux binary from the monotone web-site and it seemed
to have the same issue (although I didn't run it for as long as 0.47). I
had no issues with the 0.45 binary, which completed the checkout in
around 20 mins.

I guess something in monotone branches is giving it the issue, as
pulling just 'net.venge.monotone' works fine for me.

Can others replicate? I guess try locally if possible to avoid undue
stress on monotone.ca.

What's happening is that at some point during the pull, a branch is getting a new head which is not a close relation of all the existing heads. So monotone walks the history graph to see if the new head is a descendant of the old head or not, but the search function was broken so that multiple paths through the same revisions aren't pruned.

This should fix it, will commit shortly.

$ mtn diff
#
# old_revision [2260b4d7a1bf77381a5dcd7fde3654b20d2f57a1]
#
# patch "database.cc"
#  from [22e4b9ab811ee3efcd5a166a67094e259ea8190a]
#    to [0bc6ce7bb27323c3724ee95f099985a3abad21f3]
#
============================================================
--- database.cc 22e4b9ab811ee3efcd5a166a67094e259ea8190a
+++ database.cc 0bc6ce7bb27323c3724ee95f099985a3abad21f3
@@ -2655,6 +2655,7 @@ database::is_a_ancestor_of_b(revision_id

   vector<revision_id> todo;
   todo.push_back(ancestor);
+  set<revision_id> seen;
   while (!todo.empty())
     {
       revision_id anc = todo.back();
@@ -2666,11 +2667,16 @@ database::is_a_ancestor_of_b(revision_id
         {
           if (*i == child)
             return true;
+          else if (seen.find(*i) != seen.end())
+            continue;
           else
             {
               get_rev_height(*i, anc_height);
               if (child_height > anc_height)
-                todo.push_back(*i);
+                {
+                  seen.insert(*i);
+                  todo.push_back(*i);
+                }
             }
         }
     }


--
Timothy

Free public monotone hosting: http://mtn-host.prjek.net



reply via email to

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