Guard against calling destroy() on a missing key.#10
Guard against calling destroy() on a missing key.#10ceejbot wants to merge 1 commit intoVoxer:masterfrom
Conversation
I have seen crashes in prod when requests[mkey] doesn't exist.
|
@ceejbot: Cherry-picked over: 0fc0b9a as part of 39ad4ed...6e0215c. Released in zag@0.0.5. I also added a test that triggered the crash prior to your patch. The tests run against the new LevelDB backend 😄 I wasn't able to reproduce the issue with the UI, though. The crash is indicative of a different underlying bug. It occurs when a metrics key is removed twice from its Do you have steps that make the crash happen consistently? Its probably related to switching keys while graphing live metrics. Also, what node version are you running this on? (Probably unrelated, but I'm curious.) |
|
Running on node 0.10.25. I've only seen it three times, maybe, and I do not have any sense of how to repro -- no clues yet about when it's happened. I'll keep a lookout for it. And that's excellent news on the leveldb back end :D |
|
view |
I have seen crashes in prod when requests[mkey] doesn't exist. Not sure why this is happening, which you might want to investigate, but this check is an obvious guard against throwing when it's not there.