check return value of wterl:session_create

Versions of WiredTiger prior to 1.3.3 had trouble handling riak restarts,
returning errors from wterl:session_create that would prevent riak from
restarting if it was not cleanly shut down on the previous run. We
previously avoided checking the return value of wterl:session_create to
avoid this problem. WT 1.3.3 fixes this, so reinstate the check of the
wterl:session_create return value.
This commit is contained in:
Steve Vinoski 2012-10-14 13:43:21 -04:00
parent 4f17de26d4
commit 99b096caf3

View file

@ -103,10 +103,7 @@ start(Partition, Config) ->
{ok, ConnRef} ->
Table = "table:wt" ++ integer_to_list(Partition),
{ok, SRef} = wterl:session_open(ConnRef),
%% 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 = wterl:session_create(SRef, Table),
{ok, #state{conn=ConnRef,
table=Table,
session=SRef,