CDV ❯ Stats subsystem failure should not prevent server from running
-
Bug
-
Status: New
-
3 Minor
-
Resolution:
-
Statistics
-
-
interfaces
-
Reporter: wharley
-
October 29, 2008
-
0
-
Watchers: 0
-
December 16, 2011
-
Description
As of the fix to CDV-959, if the stats directory cannot be created, the server will (gracefully) fail to start. Instead, it should print out a warning, but be able to start and run. Probably what needs to happen is that the stats subsystem should be replaced with a dummy subsystem, so that calling code does not change but stats are not actually saved.
Note that there are two places where the directory is potentially created and reported on: StatisticsGathererSubSystem and StatisticsAgentSubSystem. If the directory can’t be created by one, it won’t be created by the other either; we should try to avoid printing out two identical warnings. Perhaps the stats buffer itself can be factored out as a subsystem, initialized in one place, and replaced with a dummy if it can’t be created.
An alternate possibility would be to fall back to creating the stats in a temp directory, and log a warning saying where they ended up. If even the temp directory is not writable then it’s probably okay to fail immediately.
Also note that right now, warnings (or errors) get logged to DsoGenericLogger and to ConsoleLogger. This creates duplicate console output. I think only one of these should be used.