From b45a9120704b44ddc0e42a2a6a9caba0ee34a575 Mon Sep 17 00:00:00 2001 From: Howard Chu Date: Thu, 28 Apr 2005 18:45:31 +0000 Subject: [PATCH] Check for abandon during transaction retry --- servers/slapd/back-bdb/add.c | 4 ++++ servers/slapd/back-bdb/delete.c | 4 ++++ servers/slapd/back-bdb/modify.c | 4 ++++ servers/slapd/back-bdb/modrdn.c | 4 ++++ 4 files changed, 16 insertions(+) diff --git a/servers/slapd/back-bdb/add.c b/servers/slapd/back-bdb/add.c index b8554453d9..2c099d493f 100644 --- a/servers/slapd/back-bdb/add.c +++ b/servers/slapd/back-bdb/add.c @@ -95,6 +95,10 @@ retry: /* transaction retry */ rs->sr_text = "internal error"; goto return_results; } + if ( op->o_abandon ) { + rs->sr_err = SLAPD_ABANDON; + goto done; + } ldap_pvt_thread_yield(); bdb_trans_backoff( ++num_retries ); } diff --git a/servers/slapd/back-bdb/delete.c b/servers/slapd/back-bdb/delete.c index e2a8561572..1c7de1e3ba 100644 --- a/servers/slapd/back-bdb/delete.c +++ b/servers/slapd/back-bdb/delete.c @@ -83,6 +83,10 @@ retry: /* transaction retry */ rs->sr_text = "internal error"; goto return_results; } + if ( op->o_abandon ) { + rs->sr_err = SLAPD_ABANDON; + goto done; + } parent_is_glue = 0; parent_is_leaf = 0; ldap_pvt_thread_yield(); diff --git a/servers/slapd/back-bdb/modify.c b/servers/slapd/back-bdb/modify.c index c1d6ca3d60..4b8b384b24 100644 --- a/servers/slapd/back-bdb/modify.c +++ b/servers/slapd/back-bdb/modify.c @@ -310,6 +310,10 @@ retry: /* transaction retry */ rs->sr_text = "internal error"; goto return_results; } + if ( op->o_abandon ) { + rs->sr_err = SLAPD_ABANDON; + goto done; + } ldap_pvt_thread_yield(); bdb_trans_backoff( ++num_retries ); } diff --git a/servers/slapd/back-bdb/modrdn.c b/servers/slapd/back-bdb/modrdn.c index e5a6024439..7fffb27183 100644 --- a/servers/slapd/back-bdb/modrdn.c +++ b/servers/slapd/back-bdb/modrdn.c @@ -103,6 +103,10 @@ retry: /* transaction retry */ rs->sr_text = "internal error"; goto return_results; } + if ( op->o_abandon ) { + rs->sr_err = SLAPD_ABANDON; + goto done; + } parent_is_glue = 0; parent_is_leaf = 0; ldap_pvt_thread_yield(); -- 2.39.5