2 ms·
I had a bug in journal replay that only occurred when a transaction of a specific size extended overlapping the last block of the journal device and wrapped aro
by bcrl 2y ago
I had a bug in journal replay that only occurred when a transaction of a specific size extended overlapping the last block of the journal device and wrapped around to the first block. While QA managed to come up with a reliable reproducer of the issue, it took writing a comprehensive tool that replayed and checked the contents of the backing store at every single state that was present on the disk during replay of the journal. Turned out that there was a missing mask in the calculation of the offset into an in memory buffer that would otherwise have been impossible to spot as it was still at a valid location within the buffer, just in the wrong location. Gabage into memcpy(), garbage out. Ooops.
C/C++ certainly gives one enough rope to shoot your foot off in the most unexpected places. That one took a heck of a long time to solve.