Commit 74f18ea7 authored by Natanael Copa's avatar Natanael Copa

extra/db: downgrade to 4.5.20

openldap does not support 4.7.x and 4.5.x is whats stable in gentoo.
Lets use this for a while.
parent 9c645c36
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=db
pkgver=4.7.25
pkgrel=0
pkgdesc="The Berkeley DB embedded database system"
# openldap does not build against 4.7.x so we keep an old version here for now.
pkgver=4.5.20.2
_ver=${pkgver%.*}
pkgrel=2
pkgdesc="The Berkeley DB embedded database system 4.5"
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
license="custom"
depends="uclibc"
makedepends=""
subpackages="$pkgname-dev $pkgname-doc"
source="http://download-uk.oracle.com/berkeley-$pkgname/$pkgname-$pkgver.tar.gz"
# Patches were found here:
# http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.20/patch.4.6.20.html
source="http://download-uk.oracle.com/berkeley-db/db-$_ver.tar.gz
patch.$_ver.1
patch.$_ver.2
"
build () {
cd "$srcdir/$pkgname-$pkgver"/build_unix
build () {
cd "$srcdir"/db-$_ver
for i in ../patch.*; do
msg "Applying $i..."
patch -p0 < $i || return 1
done
cd build_unix
../dist/configure --prefix=/usr \
--mandir=/usr/share/man \
--enable-compat185 \
--enable-shared \
--enable-static \
--disable-static \
--disable-cxx
make LIBSO_LIBS=-lpthread || return 1
make DESTDIR="$pkgdir" install
mkdir -p "$pkgdir"/usr/share/doc
mv "$pkgdir"/usr/docs "$pkgdir"/usr/share/doc/$pkgname
install -m644 -D "$srcdir"/$pkgname-$pkgver/LICENSE \
install -D -m644 "$srcdir"/db-$_ver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
md5sums="ec2b87e833779681a0c3a814aa71359e db-4.7.25.tar.gz"
md5sums="b0f1c777708cb8e9d37fb47e7ed3312d db-4.5.20.tar.gz
a571e239b9041d7990df287cbc59ad6f patch.4.5.20.1
b7a7086a067ba116f5a8464362c9a9a7 patch.4.5.20.2"
*** sequence/sequence.c.orig 27 Sep 2006 14:56:17 -0000 12.39
--- sequence/sequence.c 26 Oct 2006 07:36:05 -0000
***************
*** 228,233 ****
--- 228,236 ----
seq->seq_data.ulen = seq->seq_data.size = sizeof(seq->seq_record);
seq->seq_rp = &seq->seq_record;
+ if ((ret = __dbt_usercopy(dbenv, keyp)) != 0)
+ goto err;
+
memset(&seq->seq_key, 0, sizeof(DBT));
if ((ret = __os_malloc(dbenv, keyp->size, &seq->seq_key.data)) != 0)
goto err;
***************
*** 365,370 ****
--- 368,374 ----
ret = t_ret;
ENV_LEAVE(dbenv, ip);
+ __dbt_userfree(dbenv, keyp, NULL, NULL);
return (ret);
}
***************
*** 764,769 ****
--- 768,777 ----
DBT *key;
{
SEQ_ILLEGAL_BEFORE_OPEN(seq, "DB_SEQUENCE->get_key");
+
+ if (F_ISSET(key, DB_DBT_USERCOPY))
+ return (__db_retcopy(seq->seq_dbp->dbenv, key,
+ seq->seq_key.data, seq->seq_key.size, NULL, 0));
key->data = seq->seq_key.data;
key->size = key->ulen = seq->seq_key.size;
*** rep/rep_method.c.orig Fri Oct 20 08:34:06 2006
--- rep/rep_method.c Fri Oct 27 12:09:04 2006
***************
*** 526,535 ****
* will allow the client to either perform recovery or
* simply join in.
*/
! if (announce)
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_NEWCLIENT, NULL, dbt, 0, 0);
! else
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_ALIVE_REQ, NULL, NULL, 0, 0);
}
--- 526,537 ----
* will allow the client to either perform recovery or
* simply join in.
*/
! if (announce) {
! if ((ret = __dbt_usercopy(dbenv, dbt)) != 0)
! goto err;
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_NEWCLIENT, NULL, dbt, 0, 0);
! } else
(void)__rep_send_message(dbenv,
DB_EID_BROADCAST, REP_ALIVE_REQ, NULL, NULL, 0, 0);
}
***************
*** 553,558 ****
--- 555,561 ----
}
if (pending_event != DB_EVENT_NO_SUCH_EVENT)
DB_EVENT(dbenv, pending_event, NULL);
+ __dbt_userfree(dbenv, dbt, NULL, NULL);
return (ret);
}
*** rep/rep_record.c.orig Fri Oct 20 08:34:06 2006
--- rep/rep_record.c Mon Nov 13 10:46:29 2006
***************
*** 163,168 ****
--- 163,176 ----
return (EINVAL);
}
+ if ((ret = __dbt_usercopy(dbenv, control)) != 0 ||
+ (ret = __dbt_usercopy(dbenv, rec)) != 0) {
+ __dbt_userfree(dbenv, control, rec, NULL);
+ __db_errx(dbenv,
+ "DB_ENV->rep_process_message: error retrieving DBT contents");
+ return ret;
+ }
+
ret = 0;
db_rep = dbenv->rep_handle;
rep = db_rep->region;
***************
*** 621,626 ****
--- 629,635 ----
*ret_lsnp = rp->lsn;
ret = DB_REP_NOTPERM;
}
+ __dbt_userfree(dbenv, control, rec, NULL);
return (ret);
}
# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=db46
pkgver=4.6.21
pkgrel=4
pkgdesc="The Berkeley DB embedded database system 4.6"
url="http://www.oracle.com/technology/software/products/berkeley-db/index.html"
license="custom"
depends="uclibc"
subpackages="$pkgname-dev $pkgname-doc"
# Patches were found here:
# http://www.oracle.com/technology/products/berkeley-db/db/update/4.6.21/patch.4.6.21.html
source="http://download-uk.oracle.com/berkeley-db/db-$pkgver.tar.gz
patch.$pkgver.1
patch.$pkgver.2
patch.$pkgver.3
patch.$pkgver.4
"
build () {
cd "$srcdir"/db-$pkgver
for i in ../patch.*; do
msg "Applying $i..."
patch -p0 < $i || return 1
done
cd build_unix
../dist/configure --prefix=/usr \
--mandir=/usr/share/man \
--includedir=/usr/include/db4.6 \
--enable-compat185 \
--enable-shared \
--disable-static \
--disable-cxx
make LIBSO_LIBS=-lpthread || return 1
make DESTDIR="$pkgdir" install
cd "$pkgdir"/usr/bin
for i in db_*; do
mv $i db4.6_${i#db_}
done
cd "$pkgdir"/usr/lib
rm libdb.so libdb-4.so
mkdir -p "$pkgdir"/usr/share/doc
mv "$pkgdir"/usr/docs "$pkgdir"/usr/share/doc/$pkgname
install -D -m644 "$srcdir"/db-$pkgver/LICENSE \
"$pkgdir"/usr/share/licenses/$pkgname/LICENSE
}
md5sums="718082e7e35fc48478a2334b0bc4cd11 db-4.6.21.tar.gz
4878872edfc53c6ecb871b1062a4bdaf patch.4.6.21.1
55074e53d3acae2dcbeae8322f96e522 patch.4.6.21.2
4ccd6c9e296fb448f7ffe352fe740507 patch.4.6.21.3
ae7d3d587355fe85b512ef09b9a77d19 patch.4.6.21.4"
*** dbinc/mp.h 2007-09-28 01:28:25.000000000 +1000
--- dbinc/mp.h 2008-02-14 01:22:09.000000000 +1100
***************
*** 639,644 ****
--- 639,647 ----
*/
#define MP_TRUNC_RECOVER 0x01
+ /* Private flags to DB_MPOOLFILE->close. */
+ #define DB_MPOOL_NOLOCK 0x002 /* Already have mpf locked. */
+
#if defined(__cplusplus)
}
#endif
*** mp/mp_fopen.c 2007-05-18 03:18:01.000000000 +1000
--- mp/mp_fopen.c 2008-02-12 16:09:42.000000000 +1100
***************
*** 888,894 ****
* when we try to flush them.
*/
deleted = 0;
! MUTEX_LOCK(dbenv, mfp->mutex);
if (F_ISSET(dbmfp, MP_MULTIVERSION))
--mfp->multiversion;
if (--mfp->mpf_cnt == 0 || LF_ISSET(DB_MPOOL_DISCARD)) {
--- 888,895 ----
* when we try to flush them.
*/
deleted = 0;
! if (!LF_ISSET(DB_MPOOL_NOLOCK))
! MUTEX_LOCK(dbenv, mfp->mutex);
if (F_ISSET(dbmfp, MP_MULTIVERSION))
--mfp->multiversion;
if (--mfp->mpf_cnt == 0 || LF_ISSET(DB_MPOOL_DISCARD)) {
***************
*** 909,921 ****
}
}
if (mfp->block_cnt == 0) {
if ((t_ret =
__memp_mf_discard(dbmp, mfp)) != 0 && ret == 0)
ret = t_ret;
deleted = 1;
}
}
! if (!deleted)
MUTEX_UNLOCK(dbenv, mfp->mutex);
done: /* Discard the DB_MPOOLFILE structure. */
--- 910,928 ----
}
}
if (mfp->block_cnt == 0) {
+ /*
+ * We should never discard this mp file if our caller
+ * is holding the lock on it. See comment in
+ * __memp_sync_file.
+ */
+ DB_ASSERT(dbenv, !LF_ISSET(DB_MPOOL_NOLOCK));
if ((t_ret =
__memp_mf_discard(dbmp, mfp)) != 0 && ret == 0)
ret = t_ret;
deleted = 1;
}
}
! if (!deleted && !LF_ISSET(DB_MPOOL_NOLOCK))
MUTEX_UNLOCK(dbenv, mfp->mutex);
done: /* Discard the DB_MPOOLFILE structure. */
*** mp/mp_sync.c 2007-06-02 04:32:44.000000000 +1000
--- mp/mp_sync.c 2008-02-12 16:09:42.000000000 +1100
***************
*** 755,761 ****
* This is important since we are called with the hash bucket
* locked. The mfp will get freed via the cleanup pass.
*/
! if (dbmfp != NULL && (t_ret = __memp_fclose(dbmfp, 0)) != 0 && ret == 0)
ret = t_ret;
--mfp->mpf_cnt;
--- 755,762 ----
* This is important since we are called with the hash bucket
* locked. The mfp will get freed via the cleanup pass.
*/
! if (dbmfp != NULL &&
! (t_ret = __memp_fclose(dbmfp, DB_MPOOL_NOLOCK)) != 0 && ret == 0)
ret = t_ret;
--mfp->mpf_cnt;
*** mp/mp_region.c 2007-05-18 03:18:01.000000000 +1000
--- mp/mp_region.c 2008-06-24 13:15:56.000000000 +1000
***************
*** 249,256 ****
mtx_base = htab[0].mtx_hash;
}
if (mtx_base != MUTEX_INVALID)
! mtx_base += reginfo_off * htab_buckets;
/* Allocate hash table space and initialize it. */
if ((ret = __env_alloc(infop,
--- 249,262 ----
mtx_base = htab[0].mtx_hash;
}
+ /*
+ * We preallocated all of the mutexes in a block, so for regions after
+ * the first, we skip mutexes in use in earlier regions. Each region
+ * has the same number of buckets and there are two mutexes per hash
+ * bucket (the bucket mutex and the I/O mutex).
+ */
if (mtx_base != MUTEX_INVALID)
! mtx_base += reginfo_off * htab_buckets * 2;
/* Allocate hash table space and initialize it. */
if ((ret = __env_alloc(infop,
*** sequence/sequence.c.orig 2007-05-17 10:18:04.000000000 -0700
--- sequence/sequence.c 2008-08-14 12:24:23.000000000 -0700
***************
*** 252,257 ****
--- 252,262 ----
if ((ret != DB_NOTFOUND && ret != DB_KEYEMPTY) ||
!LF_ISSET(DB_CREATE))
goto err;
+ if (IS_REP_CLIENT(dbenv) &&
+ !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
+ ret = __db_rdonly(dbenv, "DB_SEQUENCE->open");
+ goto err;
+ }
ret = 0;
rp = &seq->seq_record;
***************
*** 304,310 ****
*/
rp = seq->seq_data.data;
if (rp->seq_version == DB_SEQUENCE_OLDVER) {
! oldver: rp->seq_version = DB_SEQUENCE_VERSION;
if (__db_isbigendian()) {
if (IS_DB_AUTO_COMMIT(dbp, txn)) {
if ((ret =
--- 309,320 ----
*/
rp = seq->seq_data.data;
if (rp->seq_version == DB_SEQUENCE_OLDVER) {
! oldver: if (IS_REP_CLIENT(dbenv) &&
! !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
! ret = __db_rdonly(dbenv, "DB_SEQUENCE->open");
! goto err;
! }
! rp->seq_version = DB_SEQUENCE_VERSION;
if (__db_isbigendian()) {
if (IS_DB_AUTO_COMMIT(dbp, txn)) {
if ((ret =
***************
*** 713,718 ****
--- 723,734 ----
MUTEX_LOCK(dbenv, seq->mtx_seq);
+ if (handle_check && IS_REP_CLIENT(dbenv) &&
+ !F_ISSET(dbp, DB_AM_NOT_DURABLE)) {
+ ret = __db_rdonly(dbenv, "DB_SEQUENCE->get");
+ goto err;
+ }
+
if (rp->seq_min + delta > rp->seq_max) {
__db_errx(dbenv, "Sequence overflow");
ret = EINVAL;
*** dbinc/repmgr.h 2007-10-31 10:23:52.000000000 -0700
--- dbinc/repmgr.h 2007-10-31 10:23:53.000000000 -0700
***************
*** 36,41 ****
--- 36,55 ----
#endif
/*
+ * The (arbitrary) maximum number of outgoing messages we're willing to hold, on
+ * a queue per connection, waiting for TCP buffer space to become available in
+ * the kernel. Rather than exceeding this limit, we simply discard additional
+ * messages (since this is always allowed by the replication protocol).
+ * As a special dispensation, if a message is destined for a specific remote
+ * site (i.e., it's not a broadcast), then we first try blocking the sending
+ * thread, waiting for space to become available (though we only wait a limited
+ * time). This is so as to be able to handle the immediate flood of (a
+ * potentially large number of) outgoing messages that replication generates, in
+ * a tight loop, when handling PAGE_REQ, LOG_REQ and ALL_REQ requests.
+ */
+ #define OUT_QUEUE_LIMIT 10
+
+ /*
* The system value is available from sysconf(_SC_HOST_NAME_MAX).
* Historically, the maximum host name was 256.
*/
***************
*** 47,52 ****
--- 61,71 ----
#define MAX_SITE_LOC_STRING (MAXHOSTNAMELEN+20)
typedef char SITE_STRING_BUFFER[MAX_SITE_LOC_STRING+1];
+ /* Default timeout values, in seconds. */
+ #define DB_REPMGR_DEFAULT_ACK_TIMEOUT (1 * US_PER_SEC)
+ #define DB_REPMGR_DEFAULT_CONNECTION_RETRY (30 * US_PER_SEC)
+ #define DB_REPMGR_DEFAULT_ELECTION_RETRY (10 * US_PER_SEC)
+
struct __repmgr_connection;
typedef struct __repmgr_connection REPMGR_CONNECTION;
struct __repmgr_queue; typedef struct __repmgr_queue REPMGR_QUEUE;
***************
*** 171,178 ****
#ifdef DB_WIN32
WSAEVENT event_object;
#endif
! #define CONN_CONNECTING 0x01 /* nonblocking connect in progress */
! #define CONN_DEFUNCT 0x02 /* socket close pending */
u_int32_t flags;
/*
--- 190,198 ----
#ifdef DB_WIN32
WSAEVENT event_object;
#endif
! #define CONN_CONGESTED 0x01 /* msg thread wait has exceeded timeout */
! #define CONN_CONNECTING 0x02 /* nonblocking connect in progress */
! #define CONN_DEFUNCT 0x04 /* socket close pending */
u_int32_t flags;
/*
***************
*** 180,189 ****
* send() function's thread. But if TCP doesn't have enough network
* buffer space for us when we first try it, we instead allocate some
* memory, and copy the message, and then send it as space becomes
! * available in our main select() thread.
*/
OUT_Q_HEADER outbound_queue;
int out_queue_length;
/*
* Input: while we're reading a message, we keep track of what phase
--- 200,215 ----
* send() function's thread. But if TCP doesn't have enough network
* buffer space for us when we first try it, we instead allocate some
* memory, and copy the message, and then send it as space becomes
! * available in our main select() thread. In some cases, if the queue
! * gets too long we wait until it's drained, and then append to it.
! * This condition variable's associated mutex is the normal per-repmgr
! * db_rep->mutex, because that mutex is always held anyway whenever the
! * output queue is consulted.
*/
OUT_Q_HEADER outbound_queue;
int out_queue_length;
+ cond_var_t drained;
+ int blockers; /* ref count of msg threads waiting on us */
/*
* Input: while we're reading a message, we keep track of what phase
*** dbinc_auto/int_def.in 2007-10-31 10:23:52.000000000 -0700
--- dbinc_auto/int_def.in 2007-10-31 10:23:52.000000000 -0700
***************
*** 1420,1425 ****
--- 1420,1428 ----
#define __repmgr_wake_waiting_senders __repmgr_wake_waiting_senders@DB_VERSION_UNIQUE_NAME@
#define __repmgr_await_ack __repmgr_await_ack@DB_VERSION_UNIQUE_NAME@
#define __repmgr_compute_wait_deadline __repmgr_compute_wait_deadline@DB_VERSION_UNIQUE_NAME@
+ #define __repmgr_await_drain __repmgr_await_drain@DB_VERSION_UNIQUE_NAME@
+ #define __repmgr_alloc_cond __repmgr_alloc_cond@DB_VERSION_UNIQUE_NAME@
+ #define __repmgr_free_cond __repmgr_free_cond@DB_VERSION_UNIQUE_NAME@
#define __repmgr_init_sync __repmgr_init_sync@DB_VERSION_UNIQUE_NAME@
#define __repmgr_close_sync __repmgr_close_sync@DB_VERSION_UNIQUE_NAME@
#define __repmgr_net_init __repmgr_net_init@DB_VERSION_UNIQUE_NAME@
*** dbinc_auto/repmgr_ext.h 2007-10-31 10:23:52.000000000 -0700
--- dbinc_auto/repmgr_ext.h 2007-10-31 10:23:52.000000000 -0700
***************
*** 21,30 ****
int __repmgr_handle_event __P((DB_ENV *, u_int32_t, void *));
void __repmgr_stash_generation __P((DB_ENV *));
int __repmgr_send __P((DB_ENV *, const DBT *, const DBT *, const DB_LSN *, int, u_int32_t));
! int __repmgr_send_one __P((DB_ENV *, REPMGR_CONNECTION *, u_int, const DBT *, const DBT *));
int __repmgr_is_permanent __P((DB_ENV *, const DB_LSN *));
! int __repmgr_bust_connection __P((DB_ENV *, REPMGR_CONNECTION *, int));
! void __repmgr_cleanup_connection __P((DB_ENV *, REPMGR_CONNECTION *));
int __repmgr_find_site __P((DB_ENV *, const char *, u_int));
int __repmgr_pack_netaddr __P((DB_ENV *, const char *, u_int, ADDRINFO *, repmgr_netaddr_t *));
int __repmgr_getaddr __P((DB_ENV *, const char *, u_int, int, ADDRINFO **));
--- 21,30 ----
int __repmgr_handle_event __P((DB_ENV *, u_int32_t, void *));
void __repmgr_stash_generation __P((DB_ENV *));
int __repmgr_send __P((DB_ENV *, const DBT *, const DBT *, const DB_LSN *, int, u_int32_t));
! int __repmgr_send_one __P((DB_ENV *, REPMGR_CONNECTION *, u_int, const DBT *, const DBT *, int));
int __repmgr_is_permanent __P((DB_ENV *, const DB_LSN *));
! int __repmgr_bust_connection __P((DB_ENV *, REPMGR_CONNECTION *));
! int __repmgr_cleanup_connection __P((DB_ENV *, REPMGR_CONNECTION *));
int __repmgr_find_site __P((DB_ENV *, const char *, u_int));
int __repmgr_pack_netaddr __P((DB_ENV *, const char *, u_int, ADDRINFO *, repmgr_netaddr_t *));
int __repmgr_getaddr __P((DB_ENV *, const char *, u_int, int, ADDRINFO **));
***************
*** 39,44 ****
--- 39,47 ----
int __repmgr_wake_waiting_senders __P((DB_ENV *));
int __repmgr_await_ack __P((DB_ENV *, const DB_LSN *));
void __repmgr_compute_wait_deadline __P((DB_ENV*, struct timespec *, db_timeout_t));
+ int __repmgr_await_drain __P((DB_ENV *, REPMGR_CONNECTION *, db_timeout_t));
+ int __repmgr_alloc_cond __P((cond_var_t *));
+ int __repmgr_free_cond __P((cond_var_t *));
int __repmgr_init_sync __P((DB_ENV *, DB_REP *));
int __repmgr_close_sync __P((DB_ENV *));
int __repmgr_net_init __P((DB_ENV *, DB_REP *));
*** repmgr/repmgr_method.c 2007-10-31 10:23:52.000000000 -0700
--- repmgr/repmgr_method.c 2007-10-31 10:23:53.000000000 -0700
***************
*** 196,204 ****
int ret;
/* Set some default values. */
! db_rep->ack_timeout = 1 * US_PER_SEC; /* 1 second */
! db_rep->connection_retry_wait = 30 * US_PER_SEC; /* 30 seconds */
! db_rep->election_retry_wait = 10 * US_PER_SEC; /* 10 seconds */
db_rep->config_nsites = 0;
db_rep->peer = DB_EID_INVALID;
db_rep->perm_policy = DB_REPMGR_ACKS_QUORUM;
--- 196,204 ----
int ret;
/* Set some default values. */
! db_rep->ack_timeout = DB_REPMGR_DEFAULT_ACK_TIMEOUT;
! db_rep->connection_retry_wait = DB_REPMGR_DEFAULT_CONNECTION_RETRY;
! db_rep->election_retry_wait = DB_REPMGR_DEFAULT_ELECTION_RETRY;
db_rep->config_nsites = 0;
db_rep->peer = DB_EID_INVALID;
db_rep->perm_policy = DB_REPMGR_ACKS_QUORUM;
***************
*** 238,243 ****
--- 238,244 ----
DB_ENV *dbenv;
{
DB_REP *db_rep;
+ REPMGR_CONNECTION *conn;
int ret;
db_rep = dbenv->rep_handle;
***************
*** 254,259 ****
--- 255,266 ----
if ((ret = __repmgr_signal(&db_rep->queue_nonempty)) != 0)
goto unlock;
+
+ TAILQ_FOREACH(conn, &db_rep->connections, entries) {
+ if (conn->blockers > 0 &&
+ ((ret = __repmgr_signal(&conn->drained)) != 0))
+ goto unlock;
+ }
UNLOCK_MUTEX(db_rep->mutex);
return (__repmgr_wake_main_thread(dbenv));
*** repmgr/repmgr_msg.c 2007-10-31 10:23:52.000000000 -0700
--- repmgr/repmgr_msg.c 2007-10-31 10:23:53.000000000 -0700
***************
*** 183,192 ****
/*
* Acknowledges a message.
- *
- * !!!
- * Note that this cannot be called from the select() thread, in case we call
- * __repmgr_bust_connection(..., FALSE).
*/
static int
ack_message(dbenv, generation, lsn)
--- 183,188 ----
***************
*** 227,235 ****
rec2.size = 0;
conn = site->ref.conn;
if ((ret = __repmgr_send_one(dbenv, conn, REPMGR_ACK,
! &control2, &rec2)) == DB_REP_UNAVAIL)
! ret = __repmgr_bust_connection(dbenv, conn, FALSE);
}
UNLOCK_MUTEX(db_rep->mutex);
--- 223,236 ----
rec2.size = 0;
conn = site->ref.conn;
+ /*
+ * It's hard to imagine anyone would care about a lost ack if
+ * the path to the master is so congested as to need blocking;
+ * so pass "blockable" argument as FALSE.
+ */
if ((ret = __repmgr_send_one(dbenv, conn, REPMGR_ACK,
! &control2, &rec2, FALSE)) == DB_REP_UNAVAIL)
! ret = __repmgr_bust_connection(dbenv, conn);
}
UNLOCK_MUTEX(db_rep->mutex);
*** repmgr/repmgr_net.c 2007-10-31 10:23:52.000000000 -0700
--- repmgr/repmgr_net.c 2007-10-31 10:23:53.000000000 -0700
***************
*** 63,69 ****
static void setup_sending_msg
__P((struct sending_msg *, u_int, const DBT *, const DBT *));
static int __repmgr_send_internal
! __P((DB_ENV *, REPMGR_CONNECTION *, struct sending_msg *));
static int enqueue_msg
__P((DB_ENV *, REPMGR_CONNECTION *, struct sending_msg *, size_t));
static int flatten __P((DB_ENV *, struct sending_msg *));
--- 63,69 ----
static void setup_sending_msg
__P((struct sending_msg *, u_int, const DBT *, const DBT *));
static int __repmgr_send_internal
! __P((DB_ENV *, REPMGR_CONNECTION *, struct sending_msg *, int));
static int enqueue_msg
__P((DB_ENV *, REPMGR_CONNECTION *, struct sending_msg *, size_t));
static int flatten __P((DB_ENV *, struct sending_msg *));
***************
*** 73,85 ****
* __repmgr_send --
* The send function for DB_ENV->rep_set_transport.
*
- * !!!
- * This is only ever called as the replication transport call-back, which means
- * it's either on one of our message processing threads or an application
- * thread. It mustn't be called from the select() thread, because we might call
- * __repmgr_bust_connection(..., FALSE) here, and that's not allowed in the