Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Unify LevelDB usage to single instance #57

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

[WIP] Unify LevelDB usage to single instance #57

wants to merge 1 commit into from

Conversation

kuenishi
Copy link
Contributor

@kuenishi kuenishi commented Feb 9, 2016

  • Perfile LevelDB instance usage are changed to use single instance
    per FLU server.
  • machi_csum_file reference is managed with machi_flu_filename_mgr
    as an aim to manage filenames with leveldb
  • Not only chunk checksums, but the list of trimmed files are also
    stored in LevelDB.
  • Remove 1024 bytes file header; instead put any metadata into
    LevelDB if needed.
  • LevelDB db_ref() lifecycle is same as that of machi_metadata_mgr
  • machi_file_proxy just uses it as it's passed at process startup
  • There are several optimization space still left as it is

This is still WIP but it might be hard to continue the work for me. Currently this has 14 tests failing, mostly minor issues like mismatch of lists given to a function that only accepts binaries.

* Perfile LevelDB instance usage are changed to use single instance
  per FLU server.
* machi_csum_file reference is managed with machi_flu_filename_mgr
  as an aim to manage filenames with leveldb
* Not only chunk checksums, but the list of trimmed files are also
  stored in LevelDB.
* Remove 1024 bytes file header; instead put any metadata into
  LevelDB if needed.
* LevelDB `db_ref()` lifecycle is same as that of `machi_metadata_mgr`
* `machi_file_proxy` just uses it as it's passed at process startup
* There are several optimization space still left as it is

WIP
@kuenishi
Copy link
Contributor Author

kuenishi commented Feb 9, 2016

Also, I don't have permissions to push to machi original repo, so I'm opening a PR from my fork.

@slfritchie
Copy link
Contributor

Heh, I see fewer than 14 test failuers ... I see 6. Or 7, depending on the run.

*failed*
in function machi_proxy_flu1_client_test:api_smoke_test/0 (test/machi_proxy_flu1_client_test.erl, line 72)
**error:{badmatch,{error,partition}}

  machi_flu1_test: flu_smoke_test...*failed*
in function machi_flu1_test:flu_smoke_test/0 (test/machi_flu1_test.erl, line 124)
**error:{badmatch,{ok,{[{"prefix!^^00000000^e31aae63-9f81-46a0-9baa-60c66b72d7b0^0",0,
                 <<"yo!">>,
                 <<2,139,98,163,106,247,61,129,61,...>>}],
               []}}}

  machi_file_proxy_eqc:41: eqc_test_...*failed*
in function eqc:quickcheck/1 (../src/eqc.erl, line 1270)
in call from machi_file_proxy_eqc:'-eqc_test_/0-fun-1-'/1 (test/machi_file_proxy_eqc.erl, line 41)
**exit:{badarg,[{eleveldb,async_get,
                   [#Ref<0.0.0.40751>,<<>>,
                    <<16,0,0,0,2,12,179,90,109,150,...>>,
                    []],
                   []},
         {eleveldb,get,3,[{file,"src/eleveldb.erl"},{line,152}]},
         {machi_csum_table,is_file_trimmed,2,
                           [{file,"src/machi_csum_table.erl"},{line,158}]},
         {machi_file_proxy,init,1,
                           [{file,"src/machi_file_proxy.erl"},{line,224}]},
         {gen_server,init_it,6,[{file,"gen_server.erl"},{line,306}]},
         {proc_lib,init_p_do_apply,3,[{file,"proc_lib.erl"},{line,237}]}]}

.*failed*
in function eqc:quickcheck/1 (../src/eqc.erl, line 1270)
in call from machi_ap_repair_eqc:'-prop_repair_test_/0-fun-1-'/3 (test/machi_ap_repair_eqc.erl, line 93)
**exit:{timeout,
    {gen_server,call,
        [<0.10322.0>,
         {req,
             {append_chunk_extra,
                 {1130,<<225,248,169,11,186,142,...>>},
                 [],0,<<"pre">>,
                 <<2,47,38,147,...>>,
                 0}},
         2000]}}

  machi_ap_repair_eqc:101: prop_repair_par_test_...*failed*
in function eqc:quickcheck/1 (../src/eqc.erl, line 1270)
in call from machi_ap_repair_eqc:'-prop_repair_par_test_/0-fun-1-'/3 (test/machi_ap_repair_eqc.erl, line 103)
**exit:{timeout,
    {gen_server,call,
        [<0.11008.0>,
         {req,
             {append_chunk_extra,
                 {1115,<<168,193,7,104,172,160,...>>},
                 [],0,<<"pre">>,
                 <<169,152,13,55,...>>,
                 0}},
         2000]}}


  [done in 18.022 s]
module 'machi_admin_util_test'
  machi_admin_util_test: verify_file_checksums_test_...*failed*
in function machi_util:wait_for_death/2 (src/machi_util.erl, line 357)
in call from machi_test_util:start_flu_packages/1 (test/machi_test_util.erl, line 56)
in call from machi_admin_util_test:verify_file_checksums_test2/0 (test/machi_admin_util_test.erl, line 48)
**exit:{not_dead_yet,<0.10485.0>}

@slfritchie
Copy link
Contributor

This PR is stalled, alas, until staff is available to resume the unfinished work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants