Rev 3799: Review comments from Martin. in http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/pack_retry_153786-1

John Arbash Meinel john at arbash-meinel.com
Tue Oct 28 17:40:16 GMT 2008


At http://bzr.arbash-meinel.com/branches/bzr/1.9-dev/pack_retry_153786-1

------------------------------------------------------------
revno: 3799
revision-id: john at arbash-meinel.com-20081028174004-ygf3v01q2iivzrbl
parent: john at arbash-meinel.com-20081023210643-6pxsgdybl89n0tz9
committer: John Arbash Meinel <john at arbash-meinel.com>
branch nick: pack_retry_153786-1
timestamp: Tue 2008-10-28 12:40:04 -0500
message:
  Review comments from Martin.
-------------- next part --------------
=== modified file 'NEWS'
--- a/NEWS	2008-10-23 21:06:43 +0000
+++ b/NEWS	2008-10-28 17:40:04 +0000
@@ -46,8 +46,9 @@
 
     * The index logic is now able to reload the list of pack files if and
       index ends up disappearing. We still don't reload if the pack data
-      itself goes missing after checking the index.
-      (John Arbash Meinel, #153786)
+      itself goes missing after checking the index. This bug appears as a
+      transient failure (file not found) when another process is writing
+      to the repository.  (John Arbash Meinel, #153786)
 
   DOCUMENTATION:
 

=== modified file 'bzrlib/index.py'
--- a/bzrlib/index.py	2008-10-23 20:53:50 +0000
+++ b/bzrlib/index.py	2008-10-28 17:40:04 +0000
@@ -1268,8 +1268,12 @@
         if self._reload_func is None:
             raise
         exc_type, exc_value, exc_traceback = sys.exc_info()
+        trace.mutter('Trying to reload after getting exception: %s',
+                     exc_value)
         if not self._reload_func():
             # We tried to reload, but nothing changed, so we fail anyway
+            trace.mutter('_reload_func indicated nothing has changed.'
+                         ' Raising original exception.')
             raise exc_type, exc_value, exc_traceback
 
     def validate(self):

=== modified file 'bzrlib/repofmt/pack_repo.py'
--- a/bzrlib/repofmt/pack_repo.py	2008-10-23 21:04:28 +0000
+++ b/bzrlib/repofmt/pack_repo.py	2008-10-28 17:40:04 +0000
@@ -456,8 +456,8 @@
         """Create an AggregateIndex.
 
         :param reload_func: A function to call if we find we are missing an
-            index. Should have the form reload_func() => True/False to indicate
-            if reloading actually changed anything.
+            index. Should have the form reload_func() => True if the list of
+            active pack files has changed.
         """
         self._reload_func = reload_func
         self.index_to_pack = {}



More information about the bazaar-commits mailing list