3 ms·
These examples seem to discuss data structure choice what I thought it might be about. I have encountered two major bugs at two separate companies all involving
by squiguy7 9y ago
These examples seem to discuss data structure choice what I thought it might be about. I have encountered two major bugs at two separate companies all involving iteration and maps.
Both of the examples were written in Go and although language shouldn't matter, iterating over a map is non-deterministic. But each time the author intended for them to construct the returned data structure in a pre-defined order.
We had been suffering from poor caching performance and saw our Cassandra reads spiking as a result. Once we spotted the incorrect cache key construction, our reads to Cassandra dropped significantly allowing for better performance all around.
Perhaps others would have spotted this but it seems innocuous in code review. I know I will be more diligent in the future.