Index: head/databases/galera/Makefile =================================================================== --- head/databases/galera/Makefile (revision 452857) +++ head/databases/galera/Makefile (revision 452858) @@ -1,87 +1,86 @@ # Created by: Horia Racoviceanu # $FreeBSD$ PORTNAME= galera -PORTVERSION?= 25.3.21 +PORTVERSION?= 25.3.22 DISTVERSIONPREFIX?= release_ -PORTREVISION= 2 CATEGORIES= databases MAINTAINER= devel@galeracluster.com COMMENT= Synchronous multi-master replication engine LICENSE= GPLv2 BUILD_DEPENDS= checkmk:devel/check \ ${LOCALBASE}/include/boost/shared_ptr.hpp:devel/boost-libs LIB_DEPENDS= libboost_date_time.so:devel/boost-libs BROKEN_aarch64= fails to compile: gu_int128.h: use of undeclared identifier '__bswap64_var' BROKEN_armv6= fails to compile: gu_int128.h: use of undeclared identifier '__bswap64_var' NOT_FOR_ARCHS= i386 # On i386 older versions of clang produce: # cannot compile this atomic library call yet ... __atomic_add_fetch # whereas newer ones generate a call to __atomic_add_fetch which ends up with # undefined reference at link time: # undefined reference to `__atomic_fetch_add_8' # https://bugs.llvm.org//show_bug.cgi?id=23262 # https://bugs.llvm.org//show_bug.cgi?id=24908 # https://tracker.crystax.net/issues/1263 NOT_FOR_ARCHS_REASON_i386=Uses 64 bit atomics that clang cannot generate on i386 USES= python:build scons ssl USE_LDCONFIG= yes USE_GITHUB= yes GH_ACCOUNT= codership LDFLAGS+= -lboost_program_options -lboost_system MAKE_ARGS+= revno=${GH_TAGNAME} system_asio=0 tests=0 USE_RC_SUBR= garb.sh # Abuse TEST_TARGET to append tests=1 (which is not a target, strictly # speaking) at the end of the "scons ..." command so that it overrides # tests=0 from ${MAKE_ARGS}. To rerun the tests a second time, remove # all *.passed files: find ./work -name *.passed -print -delete TEST_TARGET= deterministic_tests=1 tests=1 PLIST_FILES= bin/garbd \ lib/libgalera.so \ lib/libgalera_smm.so OPTIONS_DEFINE= BOOSTPOOL BPOSTATIC DEBUG BOOSTPOOL_DESC= Use boost pool allocator BPOSTATIC_DESC= Use static boost_program_options .include # Clang is available on FreeBSD 9.x but the default # compiler (e.g. /usr/bin/cc) is GCC. Force the usage of Clang. .if ${OSVERSION} < 1000024 CC= clang CXX= clang++ CPP= clang-cpp .endif .if ${PORT_OPTIONS:MBOOSTPOOL} MAKE_ARGS+= boost_pool=1 .endif .if ${PORT_OPTIONS:MBPOSTATIC} MAKE_ARGS+= bpostatic=${LOCALBASE}/lib/libboost_program_options.a .endif .if ${PORT_OPTIONS:MDEBUG} MAKE_ARGS+= debug=0 .endif do-install: ${INSTALL_PROGRAM} ${WRKSRC}/garb/garbd ${STAGEDIR}${PREFIX}/bin/ ${INSTALL_LIB} ${WRKSRC}/libgalera_smm.so ${STAGEDIR}${PREFIX}/lib/ @(cd ${STAGEDIR}${PREFIX}/lib && ${LN} -sf libgalera_smm.so \ libgalera.so) .include Index: head/databases/galera/distinfo =================================================================== --- head/databases/galera/distinfo (revision 452857) +++ head/databases/galera/distinfo (revision 452858) @@ -1,3 +1,3 @@ -TIMESTAMP = 1501158019 -SHA256 (codership-galera-release_25.3.21_GH0.tar.gz) = dc0d8e9bcbd16de98c3ee558f7e7e2cf4596670a2e2e38a03d3e45bf5c9ebd5e -SIZE (codership-galera-release_25.3.21_GH0.tar.gz) = 3276033 +TIMESTAMP = 1508930849 +SHA256 (codership-galera-release_25.3.22_GH0.tar.gz) = cf9d13af44411c8e09222554eb7b6dd82896ad4fe8c2cb54066862abbefef8fb +SIZE (codership-galera-release_25.3.22_GH0.tar.gz) = 3278520 Index: head/databases/galera/files/patch-gcomm__src__asio_tcp.cpp =================================================================== --- head/databases/galera/files/patch-gcomm__src__asio_tcp.cpp (revision 452857) +++ head/databases/galera/files/patch-gcomm__src__asio_tcp.cpp (nonexistent) @@ -1,115 +0,0 @@ ---- gcomm/src/asio_tcp.cpp.orig 2017-01-25 07:55:06 UTC -+++ gcomm/src/asio_tcp.cpp -@@ -231,10 +231,18 @@ void gcomm::AsioTcpSocket::close() - } - } - -+// Enable to introduce random errors for write handler -+// #define GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR - - void gcomm::AsioTcpSocket::write_handler(const asio::error_code& ec, - size_t bytes_transferred) - { -+#ifdef GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ static const long empty_rate(10000); -+ static const long bytes_transferred_less_than_rate(10000); -+ static const long bytes_transferred_not_zero_rate(10000); -+#endif // GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ - Critical crit(net_); - - if (state() != S_CONNECTED && state() != S_CLOSING) -@@ -252,34 +260,70 @@ void gcomm::AsioTcpSocket::write_handler - - if (!ec) - { -- gcomm_assert(send_q_.empty() == false); -- gcomm_assert(send_q_.front().len() >= bytes_transferred); -- -- while (send_q_.empty() == false && -- bytes_transferred >= send_q_.front().len()) -+ if (send_q_.empty() == true -+#ifdef GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ || ::rand() % empty_rate == 0 -+#endif // GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ ) - { -- const Datagram& dg(send_q_.front()); -- bytes_transferred -= dg.len(); -- send_q_.pop_front(); -+ log_warn << "write_handler() called with empty send_q_. " -+ << "Transport may not be reliable, closing the socket"; -+ FAILED_HANDLER(asio::error_code(EPROTO, -+ asio::error::system_category)); - } -- gcomm_assert(bytes_transferred == 0); -- -- if (send_q_.empty() == false) -+ else if (send_q_.front().len() < bytes_transferred -+#ifdef GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ || ::rand() % bytes_transferred_less_than_rate == 0 -+#endif // GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ ) - { -- const Datagram& dg(send_q_.front()); -- boost::array cbs; -- cbs[0] = asio::const_buffer(dg.header() -- + dg.header_offset(), -- dg.header_len()); -- cbs[1] = asio::const_buffer(&dg.payload()[0], -- dg.payload().size()); -- write_one(cbs); -+ log_warn << "write_handler() bytes_transferred " -+ << bytes_transferred -+ << " less than sent " -+ << send_q_.front().len() -+ << ". Transport may not be reliable, closing the socket"; -+ FAILED_HANDLER(asio::error_code(EPROTO, -+ asio::error::system_category)); - } -- else if (state_ == S_CLOSING) -+ else - { -- log_debug << "deferred close of " << id(); -- close_socket(); -- state_ = S_CLOSED; -+ while (send_q_.empty() == false && -+ bytes_transferred >= send_q_.front().len()) -+ { -+ const Datagram& dg(send_q_.front()); -+ bytes_transferred -= dg.len(); -+ send_q_.pop_front(); -+ } -+ if (bytes_transferred != 0 -+#ifdef GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ || ::rand() % bytes_transferred_not_zero_rate == 0 -+#endif // GCOMM_ASIO_TCP_SIMULATE_WRITE_HANDLER_ERROR -+ ) -+ { -+ log_warn << "write_handler() bytes_transferred " -+ << bytes_transferred -+ << " after processing the send_q_. " -+ << "Transport may not be reliable, closing the socket"; -+ FAILED_HANDLER(asio::error_code(EPROTO, -+ asio::error::system_category)); -+ } -+ else if (send_q_.empty() == false) -+ { -+ const Datagram& dg(send_q_.front()); -+ boost::array cbs; -+ cbs[0] = asio::const_buffer(dg.header() -+ + dg.header_offset(), -+ dg.header_len()); -+ cbs[1] = asio::const_buffer(&dg.payload()[0], -+ dg.payload().size()); -+ write_one(cbs); -+ } -+ else if (state_ == S_CLOSING) -+ { -+ log_debug << "deferred close of " << id(); -+ close_socket(); -+ state_ = S_CLOSED; -+ } - } - } - else if (state_ == S_CLOSING) Property changes on: head/databases/galera/files/patch-gcomm__src__asio_tcp.cpp ___________________________________________________________________ Deleted: fbsd:nokeywords ## -1 +0,0 ## -yes \ No newline at end of property Deleted: svn:eol-style ## -1 +0,0 ## -native \ No newline at end of property Deleted: svn:mime-type ## -1 +0,0 ## -text/plain \ No newline at end of property