Mark Wu has posted comments on this change.

Change subject: AdvancedStatsThread: Throttle duplicated exception log
......................................................................


Patch Set 1: I would prefer that you didn't submit this

(3 inline comments)

....................................................
File vdsm/utils.py
Line 308: 
Line 309:     def needSuppress(self, statsFunction, exceptObj):
Line 310:         if (statsFunction not in self._exceptions or
Line 311:             not self._exceptionEqual(
Line 312:                     self._exceptions[statsFunction]['exception'], 
exceptObj)):
will the throttling fail if a statfunction logs two or more messages 
alternatively?
Line 313: 
Line 314:             self._exceptions[statsFunction] = {'exception': exceptObj,
Line 315:                                                'dupCount': 0}
Line 316:             return False


Line 321:             dupCount += 1
Line 322:             if dupCount == self._dupThreshold:
Line 323:                 self._log.debug(
Line 324:                         "Log will be throttled for the same 
exception: %s" %
Line 325:                         exceptObj.message)
allow it log again after a given internal?
Line 326:             self._exceptions[statsFunction] = {'exception': exceptObj,
Line 327:                                                'dupCount': dupCount}
Line 328:             return False
Line 329: 


Line 436:                         statsFunction()
Line 437:                     except Exception, e:
Line 438:                         if not self.handleStatsException(e):
Line 439:                             if not self._logThrottle.needSuppress(
Line 440:                                         statsFunction, e):
implement a logging with a customized filter which perform this check? it 
should be more clean.
Line 441:                                 self._log.error("Stats function 
failed: %s",
Line 442:                                                 statsFunction, 
exc_info=True)
Line 443: 
Line 444:             self._stopEvent.wait(waitInterval)


--
To view, visit http://gerrit.ovirt.org/8884
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: I2ee04d8d82e2a14b0a003627981c28e5e64a46ab
Gerrit-PatchSet: 1
Gerrit-Project: vdsm
Gerrit-Branch: master
Gerrit-Owner: Zhou Zheng Sheng <[email protected]>
Gerrit-Reviewer: Federico Simoncelli <[email protected]>
Gerrit-Reviewer: Gal Hammer <[email protected]>
Gerrit-Reviewer: Mark Wu <[email protected]>
_______________________________________________
vdsm-patches mailing list
[email protected]
https://lists.fedorahosted.org/mailman/listinfo/vdsm-patches

Reply via email to