Implement an ETS-basd couch_lru

Use a monotonicaly incrementing counter instead of `erlang:now()`. We don't
technically need to time-based functionality and just want to know relative
insertion order.

Instead of gb_tree, use an ordered_set ETS. This keep items sorted by their
update order, with most recent ones at the bottom.

An set ETS replaces the dictionary which maintains a mapping from database
names to their entry in updates table.

Interface is the same as the old couch_lru, so it is a direct swap in.

Thanks to Eric Avdey for intial version of test module.

COUCHDB-3326
2 files changed
tree: c7d58be9ca45061f2a1dc8f4c158c92c400fe39a
  1. include/
  2. priv/
  3. src/
  4. test/
  5. .gitignore
  6. .travis.yml
  7. LICENSE
  8. rebar.config.script