Wednesday, May 10, 2017

[389-commits] [389-ds-base] 02/02: Ticket 49099 - ns workers prep

This is an automated email from the git hooks/post-receive script.

firstyear pushed a commit to branch master
in repository 389-ds-base.

commit 19f676aa104fb0f4158ed18dfc04d85aba759924
Author: William Brown <firstyear@redhat.com>
Date: Tue May 9 10:05:20 2017 +1000

Ticket 49099 - ns workers prep

Bug Description: We wish to move to nunc-stans to control our worker
threads and async tasks.

Fix Description: This first patch moves the NS worker pool
creation to main.c, which makes it accesible to both offline
and online jobs. As well, we no longer "support" a server without
nunc-stans so remove the configure options. We still allow enable
disable of the feature however, so this has been fully tested.

https://pagure.io/389-ds-base/issue/49099

Author: wibrown

Review by: mreynolds (thanks!)
---
configure.ac | 17 --
ldap/servers/slapd/connection.c | 4 -
ldap/servers/slapd/conntable.c | 2 -
ldap/servers/slapd/daemon.c | 253 ++++++----------------------
ldap/servers/slapd/fe.h | 2 +-
ldap/servers/slapd/globals.c | 8 +-
ldap/servers/slapd/libglobs.c | 8 -
ldap/servers/slapd/main.c | 309 ++++++++++++++++++++---------------
ldap/servers/slapd/proto-slap.h | 4 -
ldap/servers/slapd/slap.h | 8 -
src/nunc-stans/ns/ns_thrpool.c | 21 ++-
src/nunc-stans/test/test_nuncstans.c | 74 +++++++++
12 files changed, 320 insertions(+), 390 deletions(-)

diff --git a/configure.ac b/configure.ac
index 5fbf6ac..bfccc2c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -266,23 +266,6 @@ else
fi
AM_CONDITIONAL(enable_posix_winsync,test "$enable_posix_winsync" = "yes")

-if test -z "$enable_nunc_stans" ; then
- enable_nunc_stans=yes # if not set on cmdline, set default
-fi
-AC_MSG_CHECKING(for --enable-nunc-stans)
-AC_ARG_ENABLE(nunc_stans,
- AS_HELP_STRING([--enable-nunc-stans],
- [enable support for nunc-stans event framework (default: no)]))
-if test "$enable_nunc_stans" = yes ; then
- m4_include(m4/event.m4)
- AC_MSG_RESULT(yes)
- AC_DEFINE([ENABLE_NUNC_STANS], [1], [enable support for nunc-stans event framework])
-else
- AC_MSG_RESULT(no)
-fi
-AM_CONDITIONAL(enable_nunc_stans,test "$enable_nunc_stans" = "yes")
-
-
# the default prefix - override with --prefix or --with-fhs
AC_PREFIX_DEFAULT([/opt/$PACKAGE_NAME])

diff --git a/ldap/servers/slapd/connection.c b/ldap/servers/slapd/connection.c
index f6242c3..d3b0f7e 100644
--- a/ldap/servers/slapd/connection.c
+++ b/ldap/servers/slapd/connection.c
@@ -241,10 +241,8 @@ connection_cleanup(Connection *conn)

/* free the connection socket buffer */
connection_free_private_buffer(conn);
-#ifdef ENABLE_NUNC_STANS
/* even if !config_get_enable_nunc_stans, it is ok to set to 0 here */
conn->c_ns_close_jobs = 0;
-

No comments:

Post a Comment