From 3be9b64c309b45c160b62d6f5c63c705c740c69c Mon Sep 17 00:00:00 2001 From: Dave Smith Date: Thu, 11 Dec 2008 10:16:08 -0700 Subject: [PATCH] Make sure to export bdberl_get/4; adjust thrash to use RMW flag to reduce deadlocks --- src/bdberl_port.erl | 2 +- test/thrash_SUITE.erl | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/bdberl_port.erl b/src/bdberl_port.erl index d473a12..234a696 100644 --- a/src/bdberl_port.erl +++ b/src/bdberl_port.erl @@ -12,7 +12,7 @@ txn_begin/1, txn_begin/2, txn_commit/1, txn_commit/2, txn_abort/1, put/4, put/5, - get/3]). + get/3, get/4]). -define(CMD_NONE, 0). -define(CMD_OPEN_DB, 1). diff --git a/test/thrash_SUITE.erl b/test/thrash_SUITE.erl index 8e68032..00b1ebb 100644 --- a/test/thrash_SUITE.erl +++ b/test/thrash_SUITE.erl @@ -11,7 +11,7 @@ all() -> [test_thrash]. --define(PROCS, 2). +-define(PROCS, 5). test_thrash(_Config) -> %% Spin up 15 processes (async thread pool is 10) @@ -71,7 +71,7 @@ thrash_incr_loop(Port, Owner, Count) -> get_or_die(Port, DbRef, Key) -> - case bdberl_port:get(Port, DbRef, Key) of + case bdberl_port:get(Port, DbRef, Key, [rmw]) of not_found -> not_found; {ok, Value} ->