Skip to content

Commit

Permalink
Merge branch 'bloomberg:main' into ci-debug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexander-e1off authored Jul 18, 2024
2 parents aee9503 + 99e8aff commit c97922b
Show file tree
Hide file tree
Showing 16 changed files with 38 additions and 606 deletions.
3 changes: 2 additions & 1 deletion src/groups/mqb/mqba/mqba_clientsession.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,7 @@
#include <bdld_datummapbuilder.h>
#include <bdld_manageddatum.h>
#include <bdlf_bind.h>
#include <bdlf_noop.h>
#include <bdlf_placeholder.h>
#include <bdlma_localsequentialallocator.h>
#include <bdlt_timeunitratio.h>
Expand Down Expand Up @@ -1079,7 +1080,7 @@ void ClientSession::finishCheckUnconfirmedDispatched(
mwcu::WeakMemFnUtil::weakMemFn(&ClientSession::checkUnconfirmed,
d_self.acquireWeak()),
shutdownCtx,
mwcu::NoOp()));
bdlf::noOp));
}

void ClientSession::closeChannel()
Expand Down
4 changes: 1 addition & 3 deletions src/groups/mqb/mqbblp/mqbblp_queue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -395,9 +395,7 @@ void Queue::convertToLocalDispatched()

void Queue::updateStats()
{
d_state.stats()
.setReaderCount(d_state.handleParameters().readCount())
.setWriterCount(d_state.handleParameters().writeCount());
d_state.updateStats();
}

void Queue::listMessagesDispatched(mqbcmd::QueueResult* result,
Expand Down
7 changes: 7 additions & 0 deletions src/groups/mqb/mqbblp/mqbblp_queuestate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,13 @@ QueueState::subtract(const bmqp_ctrlmsg::QueueHandleParameters& params)
return mqbi::QueueCounts(it->second.readCount(), it->second.writeCount());
}

void QueueState::updateStats()
{
stats()
.setReaderCount(handleParameters().readCount())
.setWriterCount(handleParameters().writeCount());
}

mqbi::QueueCounts QueueState::consumerAndProducerCounts(
const bmqp_ctrlmsg::QueueHandleParameters& params) const
{
Expand Down
3 changes: 3 additions & 0 deletions src/groups/mqb/mqbblp/mqbblp_queuestate.h
Original file line number Diff line number Diff line change
Expand Up @@ -282,6 +282,9 @@ class QueueState {
/// Return reference to the structures for the queue engine routing.
Routers::QueueRoutingContext& routingContext();

/// Update the stats to the current values in the handleParamaters
void updateStats();

// ACCESSORS

/// Return true if the queue has upstream parameters for the specified
Expand Down
2 changes: 2 additions & 0 deletions src/groups/mqb/mqbblp/mqbblp_remotequeue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -732,6 +732,8 @@ void RemoteQueue::onHandleReleased(
BSLS_ASSERT_SAFE(d_state_p->queue()->dispatcher()->inDispatcherThread(
d_state_p->queue()));

d_state_p->updateStats();

mqbi::Cluster* cluster = d_state_p->domain()->cluster();
if (result.hasNoHandleStreamConsumers()) {
// Lost last reader for the specified subStream for the handle
Expand Down
13 changes: 3 additions & 10 deletions src/groups/mqb/mqbnet/mqbnet_tcpsessionfactory.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -680,9 +680,9 @@ void TCPSessionFactory::channelStateCallback(
<< "rejecting empty peer URI: '" << channel.get()
<< "'";

mwcio::Status status(mwcio::StatusCategory::e_GENERIC_ERROR,
d_allocator_p);
channel->close(status);
mwcio::Status closeStatus(mwcio::StatusCategory::e_GENERIC_ERROR,
d_allocator_p);
channel->close(closeStatus);
}
else {
// Keep track of active channels, for logging purposes
Expand Down Expand Up @@ -958,13 +958,6 @@ int TCPSessionFactory::start(bsl::ostream& errorDescription)

int rc = 0;

const mqbcfg::AppConfig& appConfig = mqbcfg::BrokerConfig::get();

if (!appConfig.networkInterfaces().tcpInterface().value().useNtf()) {
BALL_LOG_WARN << "Ignoring interface property 'useNtf' (false) "
<< "and using ntf, because only ntf supported";
}

ntca::InterfaceConfig interfaceConfig = ntcCreateInterfaceConfig(d_config);

bslma::ManagedPtr<mwcio::NtcChannelFactory> channelFactory;
Expand Down
6 changes: 1 addition & 5 deletions src/groups/mwc/mwcu/doc/mwcu.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ reused through various applications.

/Hierarchical Synopsis
/---------------------
The 'mwcu' package currently has 20 components having 2 level of physical
The 'mwcu' package currently has 19 components having 2 level of physical
dependency. The list below shows the hierarchal ordering of the components.
..
2. mwcu_blobiterator
Expand All @@ -22,7 +22,6 @@ dependency. The list below shows the hierarchal ordering of the components.
mwcu_atomicvalidator
mwcu_blob
mwcu_memoutstream
mwcu_noop
mwcu_objectplaceholder
mwcu_outstreamformatsaver
mwcu_sharedresource
Expand Down Expand Up @@ -58,9 +57,6 @@ dependency. The list below shows the hierarchal ordering of the components.
: 'mwcu_objectplaceholder':
: Provide a placeholder for any object.
:
: 'mwcu_noop':
: Provide a no-op functor taking an arbitrary number of arguments.
:
: 'mwcu_operationchain':
: Provide a mechanism to serialize execution of async operations.
:
Expand Down
25 changes: 0 additions & 25 deletions src/groups/mwc/mwcu/mwcu_noop.cpp

This file was deleted.

98 changes: 0 additions & 98 deletions src/groups/mwc/mwcu/mwcu_noop.h

This file was deleted.

47 changes: 0 additions & 47 deletions src/groups/mwc/mwcu/mwcu_noop_cpp03.cpp

This file was deleted.

Loading

0 comments on commit c97922b

Please sign in to comment.