Browse Source

[2252] add notes about the case that the timer is already started but not yet stopped

Naoki Kambe 12 years ago
parent
commit
dc2960e984
2 changed files with 6 additions and 1 deletions
  1. 3 0
      src/bin/xfrin/xfrin.py.in
  2. 3 1
      src/lib/python/isc/statistics/counters.py

+ 3 - 0
src/bin/xfrin/xfrin.py.in

@@ -955,6 +955,9 @@ class XfrinConnection(asyncore.dispatcher):
                     raise XfrinException('Unable to reconnect to master')
 
             # start statistics timer
+            # Note: If the timer for the zone is already started but
+            # not yet stopped due to some error, the last start time
+            # is overwritten at this point.
             self._counters.start_timer('zones', self._zone_name.to_text(),
                                        'latest_' + req_str.lower() + '_duration')
             logger.info(XFRIN_XFR_TRANSFER_STARTED, req_str, self.zone_str())

+ 3 - 1
src/lib/python/isc/statistics/counters.py

@@ -327,7 +327,9 @@ class Counters():
     def start_timer(self, *args):
         """Starts a timer which is identified by args and keeps it
         running until stop_timer() is called. It acquires a lock to
-        support multi-threaded use."""
+        support multi-threaded use. If the specified timer is already
+        started but not yet started, the last start time is
+        overwritten."""
         identifier = _concat(*args)
         with self._rlock:
             if self._disabled: return