diff --git a/src/riak_kv_wterl_backend.erl b/src/riak_kv_wterl_backend.erl index b85e242..58ece8b 100644 --- a/src/riak_kv_wterl_backend.erl +++ b/src/riak_kv_wterl_backend.erl @@ -99,11 +99,28 @@ start(Partition, Config) -> case AppStart of ok -> ok = filelib:ensure_dir(filename:join(DataRoot, "x")), - case wterl_conn:open(DataRoot, Config) of + ConnectionOpts = [Config, + {loging, true}, + {transactional, true}, + {direct_io, ["data", "log"]}, + {session_max, 128}, + {cache_size, "2GB"}, + {sync, false}, + {verbose, ["block", "shared_cache", "ckpt", "evict", + "evictserver", "fileops", "hazard", "lsm", + "mutex", "read", "readserver", "reconcile", + "salvage", "verify", "write"]}], + case wterl_conn:open(DataRoot, ConnectionOpts) of {ok, ConnRef} -> Table = "table:wt" ++ integer_to_list(Partition), - {ok, SRef} = wterl:session_open(ConnRef), - ok = wterl:session_create(SRef, Table), + SessionOpenOpts = [{isolation, "snapshot"}], + {ok, SRef} = wterl:session_open(ConnRef, wterl:config_to_bin(SessionOpenOpts)), + SessionOpts = [%TODO: {block_compressor, "snappy"} + {internal_page_max, "128K"}, + {leaf_page_max, "128K"}, + {lsm_chunk_size, "128MB"}, + {lsm_bloom_config, [{leaf_page_max, "8MB"}]} ], + ok = wterl:session_create(SRef, Table, wterl:config_to_bin(SessionOpts)), {ok, #state{conn=ConnRef, table=Table, session=SRef,