increase session count and ignore table creation errors
WiredTiger session count defaults to 50, but we need at least one per vnode, so for now hard-code it to 100. Also ignore table creation results in the kv backend because WiredTiger is currently producing a strange error if the table already exists.
This commit is contained in:
parent
99a51980eb
commit
7219281b31
2 changed files with 5 additions and 2 deletions
|
@ -92,7 +92,10 @@ start(Partition, Config) ->
|
|||
{ok, ConnRef} ->
|
||||
Table = "table:wt" ++ integer_to_list(Partition),
|
||||
{ok, SRef} = wterl:session_open(ConnRef),
|
||||
ok = wterl:session_create(SRef, Table),
|
||||
%% TODO: should check return value here, but we
|
||||
%% currently get an error when the table already
|
||||
%% exists, so for now we ignore it.
|
||||
wterl:session_create(SRef, Table),
|
||||
{ok, #state{conn=ConnRef,
|
||||
table=Table,
|
||||
session=SRef,
|
||||
|
|
|
@ -69,7 +69,7 @@ init([]) ->
|
|||
{ok, #state{}}.
|
||||
|
||||
handle_call({open, Dir, Caller}, _From, #state{conn=undefined}=State) ->
|
||||
Opts = [{create, true}, {cache_size, "100MB"}],
|
||||
Opts = [{create, true}, {cache_size, "100MB"}, {session_max, 100}],
|
||||
{Reply, NState} = case wterl:conn_open(Dir, wterl:config_to_bin(Opts)) of
|
||||
{ok, ConnRef}=OK ->
|
||||
Monitors = ets:new(?MODULE, []),
|
||||
|
|
Loading…
Reference in a new issue