infoforcefeed/OlegDB — pull request #100 by qpfiffer (2014-06-16 19:17:52+00:00)
Title: Cursor Iteration via HTTP + Bugfixes

So when this is merged it'll fix #66. This also implements an API for iterating through keys on the database side:

* `GET http://localhost:8080///_next` Will grab the next key after the one specified via ``.
* `GET http://localhost:8080///_prev` Will grab the previous key before the one specified via ``.
* `GET http://localhost:8080///_first` Will grab the first key in the tree. The `` parameter is ignored.
* `GET http://localhost:8080///_last` Will grab the last key in the tree. The `` parameter is ignored.

In addition to all this are numerous bugfixes, refactored code snippets and some tests. Some examples:
* Removed the `log_` macros from errhandle.h in favor of our own logging system
* Added a `check_warn` macro that will no throw a scary looking error into the logs. Useful for things that are alarming but not outright bad.
* Added colors to all of the `ol_log_msg` levels
* Removed `ol_bucket->hash` because it was not, and should not have been, used.
* We now check the entire range of a value in the values file to see if it is all zeroes.
* Added some new cursor functions (`olc_step` and `olc_step_back`) to help movement through the tree
* Refactored and gave some love to the Erlang frontend
* Rather large refactor of key truncation/hashing that was used in a bunch of functions. This removed a lot of potential copy-paste stuff.
* Fixed some bugs involving replay of the AOL file
* Check for null keys in all of the main jar/scoop/spoil functions to avoid some weird segfaults
* Refactored the port_driver code to be more clear and less monolithic

Code reviewers: I'm reasonably confident in this branch, tests pass and I even added a few. I'm mostly looking for any obvious things like the `memcpy()` fiasco from last week. Ping me on IRC or in here if anything is unclear or needs comments. Or just :thumbsup: it and move on.

/cc @Hamcha @zeroZshadow @colby @kyleterry