Skip to content

Commit 7381e5c

Browse files
committed
improved:delete memory cache index
1 parent 0758b3d commit 7381e5c

File tree

1 file changed

+2
-7
lines changed

1 file changed

+2
-7
lines changed

XEngine_Source/MQCore_MemoryCache/MemoryCache_DBData/MemoryCache_DBData.cpp

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -202,16 +202,11 @@ bool CMemoryCache_DBData::MemoryCache_DBData_DataDelete(XENGINE_DBMESSAGEQUEUE*
202202
else
203203
{
204204
std::tuple<__int64x, std::string> stl_Key(pSt_DBMessageInfo->nQueueSerial, pSt_DBMessageInfo->tszQueueName);
205-
206205
auto stl_MapIterator = stl_MapQuery.find(stl_Key);
207-
if (stl_MapIterator == stl_MapQuery.end())
206+
if (stl_MapIterator != stl_MapQuery.end())
208207
{
209-
MemoryCache_IsErrorOccur = true;
210-
MemoryCache_dwErrorCode = ERROR_XENGINE_MQCORE_MEMORYCACHE_DBDATA_NOTFOUND;
211-
st_LockerQuery.unlock();
212-
return false;
208+
stl_MapQuery.erase(stl_Key);
213209
}
214-
stl_MapQuery.erase(stl_Key);
215210
}
216211
st_LockerQuery.unlock();
217212
return true;

0 commit comments

Comments
 (0)