Skip to content

Commit

Permalink
VirtualStorageCatalog::put returns error
Browse files Browse the repository at this point in the history
Signed-off-by: dorjesinpo <[email protected]>
  • Loading branch information
dorjesinpo committed May 31, 2024
1 parent 11a7645 commit ff2a834
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
10 changes: 7 additions & 3 deletions src/groups/mqb/mqbs/mqbs_virtualstoragecatalog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,18 @@ VirtualStorageCatalog::put(const bmqt::MessageGUID& msgGUID,
}

// Add guid to all virtual storages.

mqbi::StorageResult::Enum lastRc = mqbi::StorageResult::e_SUCCESS;
for (VirtualStoragesIter it = d_virtualStorages.begin();
it != d_virtualStorages.end();
++it) {
it->value()->put(msgGUID, msgSize, rdaInfo, subScriptionId);
mqbi::StorageResult::Enum rc =
it->value()->put(msgGUID, msgSize, rdaInfo, subScriptionId);
if (rc != mqbi::StorageResult::e_SUCCESS) {
lastRc = rc;
}
}

return mqbi::StorageResult::e_SUCCESS; // RETURN
return lastRc; // RETURN
}

bslma::ManagedPtr<mqbi::StorageIterator>
Expand Down
2 changes: 1 addition & 1 deletion src/groups/mqb/mqbs/mqbs_virtualstoragecatalog.h
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ class VirtualStorageCatalog {
// PRIVATE TYPES
typedef bsl::shared_ptr<VirtualStorage> VirtualStorageSp;

/// appKey -> virtualStorage
/// Any(appId, appKey) -> virtualStorage
typedef mwcc::
TwoKeyHashMap<bsl::string, mqbu::StorageKey, VirtualStorageSp>
VirtualStorages;
Expand Down

0 comments on commit ff2a834

Please sign in to comment.