diff options
author | Keith Bostic <keith.bostic@mongodb.com> | 2017-08-14 02:07:17 -0400 |
---|---|---|
committer | Alex Gorrod <alexander.gorrod@mongodb.com> | 2017-08-14 16:07:17 +1000 |
commit | 42f4f0c2ab33786a487ea0b6a8a8813aca00d8f7 (patch) | |
tree | a264dcc62638bc1ba053751594a3b743acfe7967 | |
parent | 678fa39c766236f3ceda18d4c40d53beddf9fdce (diff) | |
download | mongo-42f4f0c2ab33786a487ea0b6a8a8813aca00d8f7.tar.gz |
WT-3497 Improve logging message when hitting the WT session limits (#3579)
Three places where we're using ENOMEM for generic "out of resource"
returns (transaction IDs, sessions, transaction notify entries), switch
to WT_ERROR instead.
Add a verbose error message if transaction notify is called twice, it
should never happen, but we'll want to see an error message if it does.
-rw-r--r-- | src/include/txn.i | 2 | ||||
-rw-r--r-- | src/session/session_api.c | 6 | ||||
-rw-r--r-- | src/txn/txn_ext.c | 3 |
3 files changed, 6 insertions, 5 deletions
diff --git a/src/include/txn.i b/src/include/txn.i index 05d048ce050..aa07fab0c2c 100644 --- a/src/include/txn.i +++ b/src/include/txn.i @@ -616,7 +616,7 @@ __wt_txn_id_check(WT_SESSION_IMPL *session) * more we can do. */ if (txn->id == WT_TXN_ABORTED) - WT_RET_MSG(session, ENOMEM, "Out of transaction IDs"); + WT_RET_MSG(session, WT_ERROR, "out of transaction IDs"); F_SET(txn, WT_TXN_HAS_ID); return (0); diff --git a/src/session/session_api.c b/src/session/session_api.c index 52d11651191..1a63ed675b5 100644 --- a/src/session/session_api.c +++ b/src/session/session_api.c @@ -1848,9 +1848,9 @@ __open_session(WT_CONNECTION_IMPL *conn, if (!session_ret->active) break; if (i == conn->session_size) - WT_ERR_MSG(session, ENOMEM, - "only configured to support %" PRIu32 " sessions" - " (including %d additional internal sessions)", + WT_ERR_MSG(session, WT_ERROR, + "out of sessions, only configured to support %" PRIu32 + " sessions (including %d additional internal sessions)", conn->session_size, WT_EXTRA_INTERNAL_SESSIONS); /* diff --git a/src/txn/txn_ext.c b/src/txn/txn_ext.c index 1fe4d6ddf47..103a1d38166 100644 --- a/src/txn/txn_ext.c +++ b/src/txn/txn_ext.c @@ -72,7 +72,8 @@ __wt_ext_transaction_notify( if (txn->notify == notify) return (0); if (txn->notify != NULL) - return (ENOMEM); + WT_RET_MSG( + session, WT_ERROR, "transaction notify already scheduled"); txn->notify = notify; |