Skip to content

Commit 033b701

Browse files
committed
Merge pull request #39 from rajubairishetti/fix_default_store
fix-42: don't throw exception for default store while throttling
2 parents f57ec49 + 81fc63a commit 033b701

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

src/scribe_server.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -417,6 +417,9 @@ bool scribeHandler::throttleRequest(const vector<LogEntry>& messages) {
417417
shared_ptr<store_list_t> pstores;
418418
if (cat_iter != categories.end()) {
419419
pstores = cat_iter->second;
420+
} else {
421+
// No entry present in the category map for this category. Hence return false.
422+
return false;
420423
}
421424

422425
if (!pstores) {
@@ -936,6 +939,7 @@ bool scribeHandler::configureStore(pStoreConf store_conf, int *numstores) {
936939
shared_ptr<StoreQueue> result =
937940
configureStoreCategory(store_conf, category, model);
938941
if (result == NULL) {
942+
LOG_OPER("Unable to create store queue for [%s] category", category.c_str());
939943
return false;
940944
}
941945
} else {

0 commit comments

Comments
 (0)