Fixed Weekend and Holiday STALE Flag
I got a note from one of the guys in another group about trying to hit one of my servers on the weekend, and not getting what he thought he should get. Instead of the hundreds of thousands of instruments, he was getting just a few hundred - clearly not right. But where was the problem?
The problem with finding this guy was that the bug report was sketchy at best. Made worse by the fact that the guy that reproduced it in my group failed to tell me any of the details about what he had found. Consequently, I spent quite a while trying to track down possible changes in the commit logs as opposed to looking at the code - where the problem lay.
Finally, I was able to extract this information from him, and was able to see that the STALE flag - a flag we use int he system to indicate that there have been no quotes or trades on an instrument today, was improperly showing as 'true' on the weekends. While this makes perfect sense, it's got the unintended consequence of filtering out all the STALE instruments from the output to the client.
What I needed was to change the logic for the STALE to allow for the fact that if it's not a trading day, then any update (quote, print, summary) was OK, and we're not stale. On a trading day, we use midnight of the same day. It's pretty simple logic, but it's going to make a huge difference in how this code acts on the weekends and holidays.
Glad I was able to get the information about the problem. It was pretty easy after that.