fixed cache deletion of GXS grp meta that caused deleted groups to not come back when available

This commit is contained in:
csoler 2017-01-20 23:27:18 +01:00
parent d1af2e09dc
commit ee4d722225
2 changed files with 6 additions and 2 deletions

View File

@ -1634,10 +1634,14 @@ bool RsDataService::locked_removeGroupEntries(const std::vector<RsGxsGroupId>& g
const RsGxsGroupId& grpId = *vit; const RsGxsGroupId& grpId = *vit;
mDb->sqlDelete(GRP_TABLE_NAME, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", ""); mDb->sqlDelete(GRP_TABLE_NAME, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", "");
// also remove the group meta from cache.
mGrpMetaDataCache.erase(*vit) ;
} }
ret &= mDb->commitTransaction(); ret &= mDb->commitTransaction();
mGrpMetaDataCache_ContainsAllDatabase = false ;
return ret; return ret;
} }
uint32_t RsDataService::cacheSize() const { uint32_t RsDataService::cacheSize() const {

View File

@ -63,8 +63,8 @@ static const uint32_t INDEX_AUTHEN_ADMIN = 0x00000040; // admin key
//#define GEN_EXCH_DEBUG 1 //#define GEN_EXCH_DEBUG 1
#define MSG_CLEANUP_PERIOD 60*59 // 59 minutes static const uint32_t MSG_CLEANUP_PERIOD = 60*59; // 59 minutes
#define INTEGRITY_CHECK_PERIOD 60*31 // 31 minutes static const uint32_t INTEGRITY_CHECK_PERIOD = 60*31; // 31 minutes
RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService *ns, RsGenExchange::RsGenExchange(RsGeneralDataService *gds, RsNetworkExchangeService *ns,
RsSerialType *serviceSerialiser, uint16_t servType, RsGixs* gixs, RsSerialType *serviceSerialiser, uint16_t servType, RsGixs* gixs,