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. .gitignore
  2. .travis.yml
  3. LICENSE
  4. include/
  5. priv/
  6. rebar.config.script
  7. src/
  8. test/