{"action":"created","issue":{"url":"https://api.github.com/repos/basho/eleveldb/issues/162","labels_url":"https://api.github.com/repos/basho/eleveldb/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/basho/eleveldb/issues/162/comments","events_url":"https://api.github.com/repos/basho/eleveldb/issues/162/events","html_url":"https://github.com/basho/eleveldb/pull/162","id":112182946,"number":162,"title":"Feature/mainline leveldb","user":{"login":"erikleitch","id":9666459,"avatar_url":"https://avatars.githubusercontent.com/u/9666459?v=3","gravatar_id":"","url":"https://api.github.com/users/erikleitch","html_url":"https://github.com/erikleitch","followers_url":"https://api.github.com/users/erikleitch/followers","following_url":"https://api.github.com/users/erikleitch/following{/other_user}","gists_url":"https://api.github.com/users/erikleitch/gists{/gist_id}","starred_url":"https://api.github.com/users/erikleitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikleitch/subscriptions","organizations_url":"https://api.github.com/users/erikleitch/orgs","repos_url":"https://api.github.com/users/erikleitch/repos","events_url":"https://api.github.com/users/erikleitch/events{/privacy}","received_events_url":"https://api.github.com/users/erikleitch/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":10,"created_at":"2015-10-19T16:29:48Z","updated_at":"2015-10-20T17:40:02Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/basho/eleveldb/pulls/162","html_url":"https://github.com/basho/eleveldb/pull/162","diff_url":"https://github.com/basho/eleveldb/pull/162.diff","patch_url":"https://github.com/basho/eleveldb/pull/162.patch"},"body":"PR to remove all C++11isms from both eleveldb and leveldb.  This allows timeseries eleveldb to use the current develop branch of leveldb.\r\n\r\nThis PR also removes all unused family/series constructs from both eleveldb and leveldb, and associated key comparator/translator code.    \r\n\r\nDetailed notes:\r\n\r\n**C++11isms**\r\n\r\n1) build_deps.sh has been modified to use leveldb version tags/2.1.3\r\n2) rebar.config has been modified to remove c++0x flags\r\n\r\n**eleveldb.h/cc**\r\n\r\n3) All 'family' versions of async_open/close/get/put have been removed from eleveldb.erl/cc\r\n\r\n4) All TS-specific key translation/comparison has been removed.  Key comparison now defaults to normal leveldb bytewise comparison, and no translation of keys is done at all.\r\n\r\n5) while the code in eleveldb.cc that had been modified to support the family construct has been reverted to elevledb/develop branch counterparts, where possible I have replaced the boilerplate code to submit tasks to the thread pool with a call to submit_to_thread_queue().\r\n\r\n**workitems.h/cc**\r\n\r\n6) The code in workitems.h had evolved to a messy state where half of the Task class functions were actually defined in workitems.h and half were defined in workitems.cc, more or less randomly.  While this PR essentially reverts things like the WriteTask/GetTask classes to their eleveldb/develop counterparts to remove the family behavior, I have migrated most of the workitem class functionality into workitems.cc, leaving workitems.h as a (mostly) clean interface description.  (so some code has moved around from workitems.h to workitems.cc, but should be directly comparable with the corresponding functions in elevledb/develop, for example)\r\n\r\n**misc**\r\n\r\n7) Removed a few test functions from eleveldb.erl/eleveldb.cc that shouldn't be part of production code\r\n\r\n8) Added some comments to filter code (filter.h) and rearranged some unhappy-path code to improve type-checking efficiency"},"comment":{"url":"https://api.github.com/repos/basho/eleveldb/issues/comments/149643302","html_url":"https://github.com/basho/eleveldb/pull/162#issuecomment-149643302","issue_url":"https://api.github.com/repos/basho/eleveldb/issues/162","id":149643302,"user":{"login":"erikleitch","id":9666459,"avatar_url":"https://avatars.githubusercontent.com/u/9666459?v=3","gravatar_id":"","url":"https://api.github.com/users/erikleitch","html_url":"https://github.com/erikleitch","followers_url":"https://api.github.com/users/erikleitch/followers","following_url":"https://api.github.com/users/erikleitch/following{/other_user}","gists_url":"https://api.github.com/users/erikleitch/gists{/gist_id}","starred_url":"https://api.github.com/users/erikleitch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erikleitch/subscriptions","organizations_url":"https://api.github.com/users/erikleitch/orgs","repos_url":"https://api.github.com/users/erikleitch/repos","events_url":"https://api.github.com/users/erikleitch/events{/privacy}","received_events_url":"https://api.github.com/users/erikleitch/received_events","type":"User","site_admin":false},"created_at":"2015-10-20T17:40:02Z","updated_at":"2015-10-20T17:40:02Z","body":"When I wrote ErlUtil, I wasn't sure at the time how it was going to be\nused, so it's a bit needlessly versatile from an interface perspective.\nYou can use it three ways:\n\n1) as a bunch of static function calls, which is mostly how we use it, i.e.:\n\nstd::string str = ErlUtil::getString(env, term);\n\n2) as a class instantiated with an ErlNifEnv*, i.e.:\n\nErlUtil eu(env);\nstd::string str = eu.getString(term);\n\n3) and as a class instantiated with both an ErlNifEnv* and an ERL_NIF_TERM:\n\nErlutil eu(env, term);\nstd::string str = eu.getString();\n\nThat's why there are three different versions of most class methods.  The\nno-arg versions call checkEnv() AND checkTerm() to make sure we have a\nvalid internal environment and term members.  The term-only versions call\nonly checkEnv() to make sure we have a valid internal environment member,\nand the static versions just used the passed env and term arguments without\nchecking for any internal members.\n\nSo the idea is that we check the environment only when no environment is\nprovided,  we check the term only when no term is provided, and we check\nboth when neither is provided, but that functionality is separated out into\ncheckEnv(), which only checks the env, and checkTerm(), which only checks\nthe term.\n\n\n\nOn Mon, Oct 19, 2015 at 3:35 PM, Matthew Von-Maszewski <\nnotifications@github.com> wrote:\n\n> ErlUtil.cc checkTerm() might as well be checking that env is not null too.\n> If going to be paranoid, might as well be thoroughly paranoid.\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/basho/eleveldb/pull/162#issuecomment-149366923>.\n>\n"}}