Skip to content

Commit

Permalink
Run clang format
Browse files Browse the repository at this point in the history
Signed-off-by: Dmitry Petukhov <[email protected]>
  • Loading branch information
tepamid committed Dec 16, 2024
1 parent dfaa30f commit 9128dec
Showing 1 changed file with 34 additions and 36 deletions.
70 changes: 34 additions & 36 deletions src/groups/mqb/mqbs/mqbs_filebackedstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,11 +89,11 @@ void FileBackedStorage::purgeCommon(const mqbu::StorageKey& appKey)
// Update stats
d_capacityMeter.clear();

d_queueStats_sp->onEvent<mqbstat::QueueStatsDomain::EventType::e_PURGE>(
0);
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_PURGE>(0);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
}
}

Expand Down Expand Up @@ -481,9 +481,9 @@ FileBackedStorage::releaseRef(const bmqt::MessageGUID& guid)
if (queue()) {
queue()->queueEngine()->beforeMessageRemoved(guid);
}
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(
msgLen);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(
msgLen);

// There is not really a need to remove the guid from all virtual
// storages, because we can be here only if guid doesn't exist in
Expand All @@ -498,9 +498,9 @@ FileBackedStorage::releaseRef(const bmqt::MessageGUID& guid)
d_capacityMeter.remove(1, msgLen);
d_handles.erase(it);

d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());

return mqbi::StorageResult::e_ZERO_REFERENCES;
}
Expand Down Expand Up @@ -610,9 +610,9 @@ FileBackedStorage::removeAll(const mqbu::StorageKey& appKey)
d_isEmpty.storeRelaxed(1);
}

d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());

return mqbi::StorageResult::e_SUCCESS;
}
Expand Down Expand Up @@ -700,9 +700,9 @@ int FileBackedStorage::gcExpiredMessages(
if (queue()) {
queue()->queueEngine()->beforeMessageRemoved(cit->first);
}
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(
msgLen);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(
msgLen);

// Remove message from all virtual storages.
d_virtualStorageCatalog.gc(cit->first);
Expand All @@ -721,19 +721,18 @@ int FileBackedStorage::gcExpiredMessages(

if (numMsgsDeleted > 0) {
if (numMsgsDeleted > numMsgsUnreceipted) {
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_GC_MESSAGE>(
numMsgsDeleted - numMsgsUnreceipted);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_GC_MESSAGE>(
numMsgsDeleted - numMsgsUnreceipted);
}
if (numMsgsUnreceipted) {
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_NO_SC_MESSAGE>(
numMsgsUnreceipted);
}
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());

d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
}

if (d_handles.empty()) {
Expand All @@ -748,9 +747,9 @@ bool FileBackedStorage::gcHistory()
bool hasMoreToGc = d_handles.gc(bmqsys::Time::highResolutionTimer(),
k_GC_MESSAGES_BATCH_SIZE);

d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());

return hasMoreToGc;
}
Expand Down Expand Up @@ -805,9 +804,9 @@ void FileBackedStorage::processMessageRecord(
// Update the messages & bytes monitors, and the stats.
d_capacityMeter.forceCommit(1, msgLen); // Return value ignored.

d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_ADD_MESSAGE>(
msgLen);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_ADD_MESSAGE>(
msgLen);

d_isEmpty.storeRelaxed(0);
}
Expand Down Expand Up @@ -921,9 +920,8 @@ void FileBackedStorage::processDeletionRecord(const bmqt::MessageGUID& guid)
if (queue()) {
queue()->queueEngine()->beforeMessageRemoved(guid);
}
d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(
msgLen);
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_DEL_MESSAGE>(msgLen);

// Delete 'guid' from all virtual storages, if any. Note that 'guid'
// should have already been removed from each virtual storage when confirm
Expand All @@ -949,9 +947,9 @@ void FileBackedStorage::processDeletionRecord(const bmqt::MessageGUID& guid)
d_isEmpty.storeRelaxed(1);
}

d_queueStats_sp->onEvent<
mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
d_queueStats_sp
->onEvent<mqbstat::QueueStatsDomain::EventType::e_UPDATE_HISTORY>(
d_handles.historySize());
}

void FileBackedStorage::addQueueOpRecordHandle(
Expand Down

0 comments on commit 9128dec

Please sign in to comment.