|
|
|
|
|
by felix_krull
5332 days ago
|
|
this is the implementation of a b+ tree.
the underlying logic has been very well researched since the 70s. if there is a part of mongodb that I am sure does not contain bugs, it is that very file you link to. if you want to know what it does, go out and read the relevant papers on data base technology. or graduate in CS. |
|
I also know that an 85-line, 7-argument method in a 1988-line file shouldn't depend on a global variable ("guessIncreasing") modified from several other, unrelated functions. I know that in bt_insert, which (apparently) assigns to "guessIncreasing" and then resets it to false just prior to exit, should be using an RAII class to do so instead of trying to catch every exit path, especially in a codebase that uses exceptions.
This code is amateur hour.