Skip to content

Commit

Permalink
Merge branch 'bloomberg:main' into main
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-e1off authored Aug 7, 2024
2 parents 2b5eaad + 6ec6a32 commit 917e8a1
Show file tree
Hide file tree
Showing 35 changed files with 2,291 additions and 2,375 deletions.
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@

---
[![OS Linux](https://img.shields.io/badge/OS-Linux-blue)](#)
[![OS AIX](https://img.shields.io/badge/OS-AIX-blue)](#)
[![OS Solaris](https://img.shields.io/badge/OS-Solaris-blue)](#)
[![License](https://img.shields.io/badge/License-Apache_2.0-blue)](LICENSE)
[![C++](https://img.shields.io/badge/C++-blue)](#)
Expand Down
4 changes: 1 addition & 3 deletions docs/docs/faqs/faq_general.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,11 @@ nav_order: 2

## What platforms are supported by BlazingMQ?

BlazingMQ can run on Linux, AIX and Solaris operating systems. The minimum
BlazingMQ can run on Linux and Solaris operating systems. The minimum
required versions of these operating systems are as follows:

| Operating System | Version |
| ---------------- | ------- |
| AIX | 7.1 |
| Linux | 3.10.0 |
| Solaris | 5.11 |

Expand All @@ -33,7 +32,6 @@ version less than the minimum specified version is not supported.
| GCC | 7.3 |
| clang | 10.0.1 |
| Solaris Studio | 5.13 |
| xlc | 16.1.0 |

BlazingMQ message broker and C++ client library require the C++03 version of
the C++ language standard, or any version above it.
Expand Down
11 changes: 1 addition & 10 deletions docs/docs/features/plugins.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ By default, plugin is disabled. To enable and configure it, edit `bmqbrkcfg.json
"appConfig": {
"stats": {
"snapshotInterval": 1,
"appIdTagDomains": ["<fanout-domain-1-name>", "<fanout-domain-2-name>"],
"plugins": [
...
{
Expand All @@ -44,7 +43,7 @@ By default, plugin is disabled. To enable and configure it, edit `bmqbrkcfg.json
"prometheusSpecific": {
"host": "localhost",
"port": 9091,
"mode": "E_PUSH"
"mode": "E_PUSH"
}
}
],
Expand All @@ -59,14 +58,6 @@ where

- `snapshotInterval`: represents how often stats are computed by broker
internally, in seconds (typically every 1s);
- [OPTIONAL] `appIdTagDomains`: used for troubleshooting, represents
the list of *fanout* mode domains for which *applicationId* tag will be
applied on `queue.confirm_time_max` and `queue.queue_time_max` metrics.
It can be *extremely* useful to detect slow responding consumer by
*applicationId*. If this setting is omitted/empty, or domain name not
in the list - *applicationId* tag will not be applied;<br/>
**NOTE**: This feature is available for all BlazingMQ broker roles except
*PROXY*;

2. Prometheus plugin configuration

Expand Down
2 changes: 0 additions & 2 deletions etc/cmake/BMQPlugins.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,6 @@ function(bmq_add_plugin name)
include(TargetBMQStyleUor)
target_bmq_default_compiler_flags(${name})

# Add -bbigtoc on AIX platforms
target_link_options(${name} PRIVATE "$<$<PLATFORM_ID:AIX>:$<$<CXX_COMPILER_ID:XL>:-bbigtoc>>")
bbs_import_target_dependencies(${name} ${${name}_PCDEPS})

# -=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Expand Down
71 changes: 2 additions & 69 deletions src/applications/bmqbrkr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,66 +28,13 @@
# On Linux and SunOS, this is achieved by using some linker flags
# (-whole-archive, -z allextract, ...), which indicates to the linker that it
# should keep all symbols from the libraries mentioned after, even if those are
# not used in the task. On AIX, we must first prelink the libraries .a into an
# object .o (asking it to keep all symbols with -bexpfull), and then link that
# .o with the task.
# not used in the task.
#
# By keeping all symbols, the task will be quite bigger than it should be, but
# that way we guarantee that any symbols used by the plugins will be found.
# Because of that, depencies of bmqbrkr.tsk must be kept under close watch and
# to the bare minimum.

macro(_bmq_prelink_aix_modules)
# Declare the task with compiler and linker flags
# On AIX, we are going to generate a prelink .o file with all static
# libraries, that needs to be added to the sources used to build the task
# NOTE: When doing a fully fresh build, the .o doesn't yet exist and CMake
# will complain when adding the .o as a source to the broker. This
# file is generated as a PRE_LINK rule, so at this point, just make
# sure it exist.
file( WRITE "${CMAKE_CURRENT_BINARY_DIR}/aix_prelink_libs.o" "" )
target_sources( bmqbrkr PUBLIC "${CMAKE_CURRENT_BINARY_DIR}/aix_prelink_libs.o" )

# The AIX equivalent flags are "-bexpfull -bnogc" ${deps} "-bgc" where each
# 'deps' is -bkeepfile:<full_path_to_lib.a>, but this doesn't quite seem to
# work as expected, so instead we do what is call prelinking, asking the
# loader to generate a .o with all the .a
if (IS_64BIT)
set(_bit_flag "-b64")
else()
set(_bit_flag "-b32")
endif()

# Generate the link parameters
# NOTE: o bmqbrkr_DEPENDS contains all the declared .dep:
# ex 'mqb;bmq;bce;bde;bsl'
# o _ext_libs contains all the external (from the refRoot) libs
# o _prj_libs contains explicit path to all the libs from this project
foreach( dep ${bmqbrkr_DEPENDS} )
if( TARGET ${dep} )
# It's a lib defined in one project, get the path to the output lib
# And add the proper includes dirs
list( APPEND _prj_libs "$<TARGET_FILE:${dep}>" )
get_property( _include_dir TARGET ${dep} PROPERTY INCLUDE_DIRECTORIES )
target_include_directories( bmqbrkr BEFORE INTERFACE ${_include_dir} )
else()
list( APPEND _ext_libs "$<TARGET_FILE:${dep}>" )
endif()
endforeach()

set( cmd
/bin/ld ${_bit_flag} -r -bbinder:/usr/ccs/bin/bind64
"-L${libPath}" -bexpfull -bnogc ${_prj_libs} )
foreach( lib ${_ext_libs} )
list( APPEND cmd "${lib}" )
endforeach()
list( APPEND cmd "-o" "${CMAKE_CURRENT_BINARY_DIR}/aix_prelink_libs.o" )
add_custom_command( TARGET bmqbrkr
PRE_LINK
COMMAND ${cmd}
COMMENT "Prelinking ..." )
endmacro()

if(BMQ_TARGET_BMQBRKR_NEEDED)
# Read dependencies from .dep and resolve them with pkgconfig
bbs_read_metadata(PACKAGE bmqbrkr)
Expand All @@ -104,12 +51,6 @@ if(BMQ_TARGET_BMQBRKR_NEEDED)
PROPERTIES OUTPUT_NAME "bmqbrkr.tsk")
endif()

# "-btextpsize:64K -bdatapsize:64K" Memory tweaks. See internal ticket
# D46833503
target_link_options(bmqbrkr PRIVATE
$<$<PLATFORM_ID:AIX>:$<$<CXX_COMPILER_ID:XL>:-btextpsize:64K>>
$<$<PLATFORM_ID:AIX>:$<$<CXX_COMPILER_ID:XL>:-bdatapsize:64K>>)

set_target_properties(bmqbrkr
PROPERTIES ENABLE_EXPORTS ON)

Expand All @@ -124,9 +65,7 @@ if(BMQ_TARGET_BMQBRKR_NEEDED)
# (resulting in a runtime linkage failure).
#
# Note that Solaris publishes all symbols to the
# dynamic symbol table by default, and AIX seems to
# do something similar:
# https://developer.ibm.com/articles/au-aix-symbol-visibility/
# dynamic symbol table by default.
"-Wl,--whole-archive"
${bmqbrkr_DEPENDS}
"-Wl,--no-whole-archive")
Expand All @@ -135,12 +74,6 @@ if(BMQ_TARGET_BMQBRKR_NEEDED)
"-Wl,--whole-archive"
${bmqbrkr_DEPENDS}
"-Wl,--no-whole-archive")
elseif(CMAKE_SYSTEM_NAME MATCHES "AIX")
_bmq_prelink_aix_modules()
# Keeps old symbol exporting behavior
target_link_options(bmqbrkr PRIVATE -bsvr4)
target_link_libraries(bmqbrkr PUBLIC
${bmqbrkr_DEPENDS})
elseif(CMAKE_SYSTEM_NAME MATCHES "Darwin")
target_link_libraries(bmqbrkr PRIVATE "-all_load" ${bmqbrkr_DEPENDS})
endif()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -875,10 +875,10 @@ static void test12_printMessagesDetailsTest()
{
mwctst::TestHelper::printTestName("PRINT MESSAGE DETAILS TEST");

#if defined(BSLS_PLATFORM_OS_SOLARIS) || defined(BSLS_PLATFORM_OS_AIX)
#if defined(BSLS_PLATFORM_OS_SOLARIS)
s_ignoreCheckDefAlloc = true;
// Disable default allocator check for this test until we can debug
// it on AIX/Solaris
// it on Solaris
#endif

// Simulate journal file
Expand Down
2 changes: 1 addition & 1 deletion src/groups/bmq/bmqeval/bmqeval_simpleevaluator.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ class SimpleEvaluator {
// Bison generates different code for different available standards:
// - For C++ >= 11 it generates the 'emplace' with a move constructor, so
// it's possible to use 'bslma::ManagedPtr'.
// - For C++ < 11 (AIX/Solaris) it generates the 'emplace' with a const&
// - For C++ < 11 (Solaris) it generates the 'emplace' with a const&
// copy constructor, but this constructor is deleted for
// 'bslma::ManagedPtr', so it's impossible to use here. Use
// 'bsl::shared_ptr' instead.
Expand Down
2 changes: 1 addition & 1 deletion src/groups/bmq/bmqeval/bmqeval_simpleevaluatorscanner.l
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
-?[0-9]+ {
updatePosition();
try {
// There is a problem with parsing Int64 on AIX/Solaris with string
// There is a problem with parsing Int64 on Solaris with string
// streams: fail flag is not set when overflow expected. 'bsl::stoll'
// is used as a workaround.
bsls::Types::Int64 value = bsl::stoll(yytext);
Expand Down
5 changes: 0 additions & 5 deletions src/groups/bmq/bmqimp/bmqimp_application.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -116,11 +116,6 @@ ntcCreateInterfaceConfig(const bmqt::SessionOptions& sessionOptions,

config.setThreadName("bmqimp");

#ifdef BSLS_PLATFORM_OS_AIX
// Set stack size to 1Mb for IBM.
config.setThreadStackSize(1024 * 1024);
#endif

config.setMaxThreads(1); // there is only one channel used on this
// ChannelPool, with the bmqbrkr
config.setMaxConnections(128);
Expand Down
Loading

0 comments on commit 917e8a1

Please sign in to comment.