Skip to content

Commit

Permalink
Apply clang-format
Browse files Browse the repository at this point in the history
Signed-off-by: Yuan Jing Vincent Yan <[email protected]>
  • Loading branch information
kaikulimu committed Jul 22, 2024
1 parent 5361630 commit f3d03d7
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 16 deletions.
3 changes: 2 additions & 1 deletion src/groups/mqb/mqbblp/mqbblp_storagemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,8 @@ class StorageManager : public mqbi::StorageManager {

/// Initialize the queue key info map based on information in the specified
/// `clusterState`.
virtual void initializeQueueKeyInfoMap(const mqbc::ClusterState* clusterState) BSLS_KEYWORD_OVERRIDE;
virtual void initializeQueueKeyInfoMap(
const mqbc::ClusterState* clusterState) BSLS_KEYWORD_OVERRIDE;

/// Register a queue with the specified `uri`, `queueKey` and
/// `partitionId`, having the specified `appIdKeyPairs`, and belonging
Expand Down
3 changes: 2 additions & 1 deletion src/groups/mqb/mqbc/mqbc_clusterstatemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,8 @@ void ClusterStateManager::do_applyCSLSelf(const ClusterFSMArgsSp& args)
d_clusterStateLedger_mp->apply(clusterStateSnapshot);
}

void ClusterStateManager::do_initializeQueueKeyInfoMap(const ClusterFSMArgsSp& args)
void ClusterStateManager::do_initializeQueueKeyInfoMap(
const ClusterFSMArgsSp& args)
{
// executed by the cluster *DISPATCHER* thread

Expand Down
4 changes: 2 additions & 2 deletions src/groups/mqb/mqbc/mqbc_clusterstatemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,8 @@ class ClusterStateManager
virtual void
do_applyCSLSelf(const ClusterFSMArgsSp& args) BSLS_KEYWORD_OVERRIDE;

virtual void
do_initializeQueueKeyInfoMap(const ClusterFSMArgsSp& args) BSLS_KEYWORD_OVERRIDE;
virtual void do_initializeQueueKeyInfoMap(const ClusterFSMArgsSp& args)
BSLS_KEYWORD_OVERRIDE;

virtual void do_sendFollowerLSNRequests(const ClusterFSMArgsSp& args)
BSLS_KEYWORD_OVERRIDE;
Expand Down
10 changes: 8 additions & 2 deletions src/groups/mqb/mqbc/mqbc_clusterstatetable.h
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,10 @@ class ClusterStateTable
FOL_CSL_RQST,
sendFollowerClusterStateResponse,
FOL_HEALING);
CST_CFG(FOL_HEALING, CSL_CMT_SUCCESS, stopWatchDog_initializeQueueKeyInfoMap, FOL_HEALED);
CST_CFG(FOL_HEALING,
CSL_CMT_SUCCESS,
stopWatchDog_initializeQueueKeyInfoMap,
FOL_HEALED);
CST_CFG(FOL_HEALING, CSL_CMT_FAIL, triggerWatchDog, UNKNOWN);
CST_CFG(FOL_HEALING,
RST_UNKNOWN,
Expand Down Expand Up @@ -513,7 +516,10 @@ class ClusterStateTable
REGISTRATION_RQST,
storeFollowerLSNs_sendRegistrationResponse,
LDR_HEALING_STG2);
CST_CFG(LDR_HEALING_STG2, CSL_CMT_SUCCESS, stopWatchDog_initializeQueueKeyInfoMap, LDR_HEALED);
CST_CFG(LDR_HEALING_STG2,
CSL_CMT_SUCCESS,
stopWatchDog_initializeQueueKeyInfoMap,
LDR_HEALED);
CST_CFG(LDR_HEALING_STG2, CSL_CMT_FAIL, triggerWatchDog, UNKNOWN);
CST_CFG(LDR_HEALING_STG2,
RST_UNKNOWN,
Expand Down
18 changes: 10 additions & 8 deletions src/groups/mqb/mqbc/mqbc_storagemanager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2300,8 +2300,8 @@ void StorageManager::do_bufferLiveData(const PartitionFSMArgsSp& args)
pinfo.primaryStatus(),
d_clusterData_p->identity().description(),
skipAlarm,
true)) { // isFSMWorkflow
return; // RETURN
true)) { // isFSMWorkflow
return; // RETURN
}

d_recoveryManager_mp->bufferStorageEvent(partitionId,
Expand Down Expand Up @@ -2421,8 +2421,8 @@ void StorageManager::do_processLiveData(const PartitionFSMArgsSp& args)
pinfo.primaryStatus(),
d_clusterData_p->identity().description(),
skipAlarm,
true)) { // isFSMWorkflow
return; // RETURN
true)) { // isFSMWorkflow
return; // RETURN
}

mqbs::FileStore* fs = d_fileStores[static_cast<size_t>(partitionId)].get();
Expand Down Expand Up @@ -3482,7 +3482,8 @@ void StorageManager::stop()
bdlf::PlaceHolders::_2)); // latch
}

void StorageManager::initializeQueueKeyInfoMap(const mqbc::ClusterState* clusterState)
void StorageManager::initializeQueueKeyInfoMap(
const mqbc::ClusterState* clusterState)
{
// executed by the *CLUSTER DISPATCHER* thread

Expand All @@ -3495,9 +3496,10 @@ void StorageManager::initializeQueueKeyInfoMap(const mqbc::ClusterState* cluster
return; // RETURN
}

BSLS_ASSERT_SAFE(bsl::all_of(d_queueKeyInfoMapVec.cbegin(),
d_queueKeyInfoMapVec.cend(),
bdlf::MemFnUtil::memFn(&QueueKeyInfoMap::empty)));
BSLS_ASSERT_SAFE(
bsl::all_of(d_queueKeyInfoMapVec.cbegin(),
d_queueKeyInfoMapVec.cend(),
bdlf::MemFnUtil::memFn(&QueueKeyInfoMap::empty)));

// Populate 'd_queueKeyInfoMapVec' from cluster state
for (DomainStatesCIter dscit = clusterState->domainStates().cbegin();
Expand Down
3 changes: 2 additions & 1 deletion src/groups/mqb/mqbc/mqbc_storagemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -808,7 +808,8 @@ class StorageManager

/// Initialize the queue key info map based on information in the specified
/// `clusterState`.
virtual void initializeQueueKeyInfoMap(const mqbc::ClusterState* clusterState) BSLS_KEYWORD_OVERRIDE;
virtual void initializeQueueKeyInfoMap(
const mqbc::ClusterState* clusterState) BSLS_KEYWORD_OVERRIDE;

/// Register a queue with the specified `uri`, `queueKey` and
/// `partitionId`, having the spcified `appIdKeyPairs`, and belonging to
Expand Down
3 changes: 2 additions & 1 deletion src/groups/mqb/mqbi/mqbi_storagemanager.h
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,8 @@ class StorageManager : public mqbi::AppKeyGenerator {

/// Initialize the queue key info map based on information in the specified
/// `clusterState`.
virtual void initializeQueueKeyInfoMap(const mqbc::ClusterState* clusterState) = 0;
virtual void
initializeQueueKeyInfoMap(const mqbc::ClusterState* clusterState) = 0;

/// Register a queue with the specified `uri`, `queueKey` and
/// `partitionId`, having the specified `appIdKeyPairs`, and belonging
Expand Down

0 comments on commit f3d03d7

Please sign in to comment.