From 71f2e273ea3819b341ffd15a27670bf89bed658e Mon Sep 17 00:00:00 2001 From: csoler Date: Fri, 1 Jan 2021 23:36:16 +0100 Subject: [PATCH] moved all metadata cache switches into DataStore as a single internal variable --- libretroshare/src/gxs/rsdataservice.cc | 57 +++++++++++++----------- libretroshare/src/gxs/rsdataservice.h | 22 +++++---- libretroshare/src/gxs/rsgds.h | 5 +-- libretroshare/src/gxs/rsgenexchange.cc | 6 +-- libretroshare/src/gxs/rsgxsdataaccess.cc | 12 ++--- libretroshare/src/gxs/rsgxsdataaccess.h | 2 + libretroshare/src/gxs/rsgxsnetservice.cc | 10 ++--- libretroshare/src/gxs/rsgxsnetservice.h | 2 + libretroshare/src/gxs/rsgxsutil.cc | 4 +- libretroshare/src/gxstrans/p3gxstrans.cc | 4 +- 10 files changed, 65 insertions(+), 59 deletions(-) diff --git a/libretroshare/src/gxs/rsdataservice.cc b/libretroshare/src/gxs/rsdataservice.cc index 2471efd0a..0315c9178 100644 --- a/libretroshare/src/gxs/rsdataservice.cc +++ b/libretroshare/src/gxs/rsdataservice.cc @@ -123,6 +123,7 @@ RsDataService::RsDataService(const std::string &serviceDir, const std::string &d bool isNewDatabase = !RsDirUtil::fileExists(mDbPath); mDb = new RetroDb(mDbPath, RetroDb::OPEN_READWRITE_CREATE, key); + mUseCache = true; initialise(isNewDatabase); @@ -482,7 +483,7 @@ bool RsDataService::finishReleaseUpdate(int release, bool result) return result; } -std::shared_ptr RsDataService::locked_getGrpMeta(RetroCursor& c, int colOffset,bool use_cache) +std::shared_ptr RsDataService::locked_getGrpMeta(RetroCursor& c, int colOffset) { #ifdef RS_DATA_SERVICE_DEBUG std::cerr << "RsDataService::locked_getGrpMeta()" << std::endl; @@ -505,7 +506,7 @@ std::shared_ptr RsDataService::locked_getGrpMeta(RetroCursor& if(grpId.isNull()) // not in the DB! return nullptr; - if(use_cache) + if(mUseCache) grpMeta = mGrpMetaDataCache.getOrCreateMeta(grpId); else grpMeta = std::make_shared(); @@ -641,7 +642,7 @@ RsNxsGrp* RsDataService::locked_getGroup(RetroCursor &c) return NULL; } -std::shared_ptr RsDataService::locked_getMsgMeta(RetroCursor &c, int colOffset,bool use_cache) +std::shared_ptr RsDataService::locked_getMsgMeta(RetroCursor &c, int colOffset) { bool ok = true; uint32_t data_len = 0, @@ -664,7 +665,7 @@ std::shared_ptr RsDataService::locked_getMsgMeta(RetroCursor & std::shared_ptr msgMeta; - if(use_cache) + if(mUseCache) msgMeta = mMsgMetaDataCache[group_id].getOrCreateMeta(msg_id); else msgMeta = std::make_shared(); @@ -1059,7 +1060,7 @@ bool RsDataService::validSize(RsNxsGrp* grp) const return false; } -int RsDataService::retrieveNxsGrps(std::map &grp, bool withMeta, bool cache) +int RsDataService::retrieveNxsGrps(std::map &grp, bool withMeta) { #ifdef RS_DATA_SERVICE_DEBUG_TIME rstime::RsScopeTimer timer(""); @@ -1076,7 +1077,7 @@ int RsDataService::retrieveNxsGrps(std::map &grp, bool { std::vector grps; - locked_retrieveGroups(c, grps, withMeta ? mColGrp_WithMetaOffset : 0,cache); + locked_retrieveGroups(c, grps, withMeta ? mColGrp_WithMetaOffset : 0); std::vector::iterator vit = grps.begin(); #ifdef RS_DATA_SERVICE_DEBUG_TIME @@ -1107,7 +1108,7 @@ int RsDataService::retrieveNxsGrps(std::map &grp, bool if(c) { std::vector grps; - locked_retrieveGroups(c, grps, withMeta ? mColGrp_WithMetaOffset : 0,cache); + locked_retrieveGroups(c, grps, withMeta ? mColGrp_WithMetaOffset : 0); if(!grps.empty()) { @@ -1139,7 +1140,7 @@ int RsDataService::retrieveNxsGrps(std::map &grp, bool return 1; } -void RsDataService::locked_retrieveGroups(RetroCursor* c, std::vector& grps, int metaOffset,bool use_cache) +void RsDataService::locked_retrieveGroups(RetroCursor* c, std::vector& grps, int metaOffset) { if(c){ bool valid = c->moveToFirst(); @@ -1151,7 +1152,7 @@ void RsDataService::locked_retrieveGroups(RetroCursor* c, std::vector if(g) { if (metaOffset) - g->metaData = new RsGxsGrpMetaData(*locked_getGrpMeta(*c, metaOffset,use_cache)); + g->metaData = new RsGxsGrpMetaData(*locked_getGrpMeta(*c, metaOffset)); else g->metaData = nullptr; @@ -1162,7 +1163,7 @@ void RsDataService::locked_retrieveGroups(RetroCursor* c, std::vector } } -int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, bool withMeta, bool cache) +int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, bool withMeta) { #ifdef RS_DATA_SERVICE_DEBUG_TIME rstime::RsScopeTimer timer(""); @@ -1185,7 +1186,7 @@ int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, withMeta ? mMsgColumnsWithMeta : mMsgColumns, KEY_GRP_ID+ "='" + grpId.toStdString() + "'", ""); if(c) - locked_retrieveMessages(c, msgSet, withMeta ? mColMsg_WithMetaOffset : 0,cache); + locked_retrieveMessages(c, msgSet, withMeta ? mColMsg_WithMetaOffset : 0); delete c; } @@ -1204,7 +1205,7 @@ int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, if(c) { - locked_retrieveMessages(c, msgSet, withMeta ? mColMsg_WithMetaOffset : 0,cache); + locked_retrieveMessages(c, msgSet, withMeta ? mColMsg_WithMetaOffset : 0); } delete c; @@ -1227,7 +1228,7 @@ int RsDataService::retrieveNxsMsgs(const GxsMsgReq &reqIds, GxsMsgResult &msg, return 1; } -void RsDataService::locked_retrieveMessages(RetroCursor *c, std::vector &msgs, int metaOffset,bool use_cache) +void RsDataService::locked_retrieveMessages(RetroCursor *c, std::vector &msgs, int metaOffset) { bool valid = c->moveToFirst(); while(valid){ @@ -1235,7 +1236,7 @@ void RsDataService::locked_retrieveMessages(RetroCursor *c, std::vectormetaData = new RsGxsMsgMetaData(*locked_getMsgMeta(*c, metaOffset,use_cache)); + m->metaData = new RsGxsMsgMetaData(*locked_getMsgMeta(*c, metaOffset)); else m->metaData = nullptr; @@ -1268,7 +1269,7 @@ int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaRes if(msgIdV.empty()) { - if(cache.isCacheUpToDate()) + if(mUseCache && cache.isCacheUpToDate()) cache.getFullMetaList(msgMeta[grpId]); else { @@ -1276,8 +1277,10 @@ int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaRes if (c) { - locked_retrieveMsgMetaList(c, msgMeta[grpId]); - cache.setCacheUpToDate(true); + locked_retrieveMsgMetaList(c, msgMeta[grpId]); + + if(mUseCache) + cache.setCacheUpToDate(true); } delete c; } @@ -1294,7 +1297,7 @@ int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaRes { const RsGxsMessageId& msgId = *sit; - auto meta = cache.getMeta(msgId); + auto meta = mUseCache?cache.getMeta(msgId): (std::shared_ptr()); if(meta) metaSet.push_back(meta); @@ -1303,7 +1306,7 @@ int RsDataService::retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaRes RetroCursor* c = mDb->sqlQuery(MSG_TABLE_NAME, mMsgMetaColumns, KEY_GRP_ID+ "='" + grpId.toStdString() + "' AND " + KEY_MSG_ID + "='" + msgId.toStdString() + "'", ""); c->moveToFirst(); - auto meta = locked_getMsgMeta(*c, 0,true); + auto meta = locked_getMsgMeta(*c, 0); if(meta) metaSet.push_back(meta); @@ -1337,7 +1340,7 @@ void RsDataService::locked_retrieveGrpMetaList(RetroCursor *c, std::mapmGroupId] = m; @@ -1357,7 +1360,7 @@ void RsDataService::locked_retrieveMsgMetaList(RetroCursor *c, std::vectormoveToFirst(); while(valid) { - auto m = locked_getMsgMeta(*c, 0,true); + auto m = locked_getMsgMeta(*c, 0); if(m != nullptr) msgMeta.push_back(m); @@ -1383,7 +1386,7 @@ int RsDataService::retrieveGxsGrpMetaData(std::mapfirst) ; + auto meta = mUseCache?mGrpMetaDataCache.getMeta(mit->first): (std::shared_ptr()) ; if(meta) mit->second = meta; @@ -1431,7 +1435,8 @@ int RsDataService::retrieveGxsGrpMetaData(std::mapsqlQuery(GRP_TABLE_NAME, mGrpMetaColumns, "grpId='" + grpId.toStdString() + "'", ""); c->moveToFirst(); - auto meta = locked_getGrpMeta(*c, 0,true); + + auto meta = locked_getGrpMeta(*c, 0); if(meta) mit->second = meta; diff --git a/libretroshare/src/gxs/rsdataservice.h b/libretroshare/src/gxs/rsdataservice.h index 9cdd9d381..657de7c6f 100644 --- a/libretroshare/src/gxs/rsdataservice.h +++ b/libretroshare/src/gxs/rsdataservice.h @@ -138,26 +138,23 @@ public: * Retrieves all msgs * @param reqIds requested msg ids (grpId,msgId), leave msg list empty to get all msgs for the grp * @param msg result of msg retrieval - * @param cache IGNORED whether to store results of this retrieval in memory - * for faster later retrieval - * @param strictFilter if true do not request any message if reqIds is empty + * @param withMeta true will also retrieve metadata * @return error code */ - int retrieveNxsMsgs( const GxsMsgReq& reqIds, GxsMsgResult& msg, bool withMeta = false, bool cache=true ); + int retrieveNxsMsgs(const GxsMsgReq& reqIds, GxsMsgResult& msg, bool withMeta = false); /*! * Retrieves groups, if empty, retrieves all grps, if map is not empty * only retrieve entries, if entry cannot be found, it is removed from map * @param grp retrieved groups * @param withMeta this initialise the metaData member of the nxsgroups retrieved - * @param cache whether to store retrieval in mem for faster later retrieval * @return error code */ - int retrieveNxsGrps(std::map& grp, bool withMeta, bool cache); + int retrieveNxsGrps(std::map& grp, bool withMeta); /*! * Retrieves meta data of all groups stored (most current versions only) - * @param cache whether to store retrieval in mem for faster later retrieval + * @param grp output group meta data * @return error code */ int retrieveGxsGrpMetaData(std::map > &grp); @@ -166,7 +163,6 @@ public: * Retrieves meta data of all groups stored (most current versions only) * @param grpIds grpIds for which to retrieve meta data * @param msgMeta meta data result as map of grpIds to array of metadata for that grpId - * @param cache whether to store retrieval in mem for faster later retrieval * @return error code */ int retrieveGxsMsgMetaData(const GxsMsgReq& reqIds, GxsMsgMetaResult& msgMeta); @@ -272,7 +268,7 @@ private: * @param c cursor to result set * @param msgs messages retrieved from cursor are stored here */ - void locked_retrieveMessages(RetroCursor* c, std::vector& msgs, int metaOffset, bool use_cache); + void locked_retrieveMessages(RetroCursor* c, std::vector& msgs, int metaOffset); /*! * Retrieves all the grp results from a cursor @@ -280,7 +276,7 @@ private: * @param grps groups retrieved from cursor are stored here * @param withMeta this initialise the metaData member of the nxsgroups retrieved */ - void locked_retrieveGroups(RetroCursor* c, std::vector& grps, int metaOffset, bool use_cache); + void locked_retrieveGroups(RetroCursor* c, std::vector& grps, int metaOffset); /*! * Retrieves all the msg meta results from a cursor @@ -300,13 +296,13 @@ private: * extracts a msg meta item from a cursor at its * current position */ - std::shared_ptr locked_getMsgMeta(RetroCursor& c, int colOffset, bool use_cache); + std::shared_ptr locked_getMsgMeta(RetroCursor& c, int colOffset); /*! * extracts a grp meta item from a cursor at its * current position */ - std::shared_ptr locked_getGrpMeta(RetroCursor& c, int colOffset, bool use_cache); + std::shared_ptr locked_getGrpMeta(RetroCursor& c, int colOffset); /*! * extracts a msg item from a cursor at its @@ -448,6 +444,8 @@ private: t_MetaDataCache mGrpMetaDataCache; std::map > mMsgMetaDataCache; + + bool mUseCache; }; #endif // RSDATASERVICE_H diff --git a/libretroshare/src/gxs/rsgds.h b/libretroshare/src/gxs/rsgds.h index 6e7185805..0555ccd03 100644 --- a/libretroshare/src/gxs/rsgds.h +++ b/libretroshare/src/gxs/rsgds.h @@ -142,7 +142,7 @@ public: * @param strictFilter if true do not request any message if reqIds is empty * @return error code */ - virtual int retrieveNxsMsgs( const GxsMsgReq& reqIds, GxsMsgResult& msg, bool withMeta = false , bool cache=true) = 0; + virtual int retrieveNxsMsgs( const GxsMsgReq& reqIds, GxsMsgResult& msg, bool withMeta = false ) = 0; /*! * Retrieves all groups stored. Caller owns the memory and is supposed to delete the RsNxsGrp pointers after use. @@ -151,7 +151,7 @@ public: * @param cache whether to store retrieval in mem for faster later retrieval * @return error code */ - virtual int retrieveNxsGrps(std::map& grp, bool withMeta, bool cache) = 0; + virtual int retrieveNxsGrps(std::map& grp, bool withMeta) = 0; /*! * Retrieves meta data of all groups stored (most current versions only) @@ -168,7 +168,6 @@ public: * Retrieves meta data of all groups stored (most current versions only) * @param grpIds grpIds for which to retrieve meta data * @param msgMeta meta data result as map of grpIds to array of metadata for that grpId - * @param cache whether to store retrieval in mem for faster later retrieval * @return error code */ virtual int retrieveGxsMsgMetaData(const GxsMsgReq& msgIds, GxsMsgMetaResult& msgMeta) = 0; diff --git a/libretroshare/src/gxs/rsgenexchange.cc b/libretroshare/src/gxs/rsgenexchange.cc index 042916e8d..90bf3595e 100644 --- a/libretroshare/src/gxs/rsgenexchange.cc +++ b/libretroshare/src/gxs/rsgenexchange.cc @@ -1414,7 +1414,7 @@ bool RsGenExchange::retrieveNxsIdentity(const RsGxsGroupId& group_id,RsNxsGrp *& grp[group_id]=nullptr; std::map::const_iterator grp_it; - if(! mDataStore->retrieveNxsGrps(grp, true,true) || grp.end()==(grp_it=grp.find(group_id)) || !grp_it->second) + if(! mDataStore->retrieveNxsGrps(grp, true) || grp.end()==(grp_it=grp.find(group_id)) || !grp_it->second) { std::cerr << "(EE) Cannot retrieve group data for group " << group_id << " in service " << mServType << std::endl; return false; @@ -2802,7 +2802,7 @@ void RsGenExchange::publishGrps() RsNxsGrpDataTemporaryMap oldGrpDatas; oldGrpDatas.insert(std::make_pair(grpId, (RsNxsGrp*)NULL)); - if(mDataStore->retrieveNxsGrps(oldGrpDatas,true,true) && oldGrpDatas.size() == 1) + if(mDataStore->retrieveNxsGrps(oldGrpDatas,true) && oldGrpDatas.size() == 1) { auto oldGrp = oldGrpDatas[grpId]; c->mOldGroupItem = dynamic_cast(mSerialiser->deserialise(oldGrp->grp.bin_data,&oldGrp->grp.bin_len)); @@ -3329,7 +3329,7 @@ void RsGenExchange::performUpdateValidation() for(auto vit(mGroupUpdates.begin()); vit != mGroupUpdates.end(); ++vit) grpDatas.insert(std::make_pair(vit->newGrp->grpId, (RsNxsGrp*)NULL)); - if(grpDatas.empty() || !mDataStore->retrieveNxsGrps(grpDatas,true,true)) + if(grpDatas.empty() || !mDataStore->retrieveNxsGrps(grpDatas,true)) { if(grpDatas.empty()) RsErr() << __PRETTY_FUNCTION__ << " Validation of multiple group updates failed: no group in list!" << std::endl; diff --git a/libretroshare/src/gxs/rsgxsdataaccess.cc b/libretroshare/src/gxs/rsgxsdataaccess.cc index c169b9999..3c97e065c 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.cc +++ b/libretroshare/src/gxs/rsgxsdataaccess.cc @@ -860,7 +860,7 @@ bool RsGxsDataAccess::getGroupSerializedData(GroupSerializedDataReq* req) for(std::list::iterator lit = grpIdsOut.begin();lit != grpIdsOut.end();++lit) grpData[*lit] = nullptr; - bool ok = mDataStore->retrieveNxsGrps(grpData, true, true); + bool ok = mDataStore->retrieveNxsGrps(grpData, true); req->mGroupData.clear(); std::map::iterator mit = grpData.begin(); @@ -888,7 +888,7 @@ bool RsGxsDataAccess::getGroupData(GroupDataReq* req) grpData[*lit] = nullptr; } - bool ok = mDataStore->retrieveNxsGrps(grpData, true, true); + bool ok = mDataStore->retrieveNxsGrps(grpData, true); std::map::iterator mit = grpData.begin(); for(; mit != grpData.end(); ++mit) @@ -911,7 +911,7 @@ bool RsGxsDataAccess::getGroupSummary(GroupMetaReq* req) for(auto lit = grpIdsOut.begin();lit != grpIdsOut.end(); ++lit) grpMeta[*lit] = nullptr; - mDataStore->retrieveGxsGrpMetaData(grpMeta); + mDataStore->retrieveGxsGrpMetaData(grpMeta); for(auto mit = grpMeta.begin(); mit != grpMeta.end(); ++mit) req->mGroupMetaData.push_back(mit->second); @@ -954,7 +954,7 @@ bool RsGxsDataAccess::getMsgData(MsgDataReq* req) if((opts.mMsgFlagMask || opts.mStatusMask) && msgIdOut.empty()) return true; - mDataStore->retrieveNxsMsgs(msgIdOut, req->mMsgData, true, true); + mDataStore->retrieveNxsMsgs(msgIdOut, req->mMsgData, true); return true; } @@ -1439,7 +1439,7 @@ bool RsGxsDataAccess::getMsgRelatedInfo(MsgRelatedInfoReq *req) else if(req->Options.mReqType == GXS_REQUEST_TYPE_MSG_RELATED_DATA) { GxsMsgResult msgResult; - mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, true, true); + mDataStore->retrieveNxsMsgs(filteredOutMsgIds, msgResult, true); req->mMsgDataResult[grpMsgIdPair] = msgResult[grpId]; } } @@ -1699,7 +1699,7 @@ bool RsGxsDataAccess::getGroupData(const RsGxsGroupId& grpId, RsNxsGrp *& grp_da grps[grpId] = nullptr ; - if(mDataStore->retrieveNxsGrps(grps, false, true)) // the false here is very important: it removes the private key parts. + if(mDataStore->retrieveNxsGrps(grps, false)) // the false here is very important: it removes the private key parts. { grp_data = grps.begin()->second; return true; diff --git a/libretroshare/src/gxs/rsgxsdataaccess.h b/libretroshare/src/gxs/rsgxsdataaccess.h index 90d61994e..3c62ade1e 100644 --- a/libretroshare/src/gxs/rsgxsdataaccess.h +++ b/libretroshare/src/gxs/rsgxsdataaccess.h @@ -511,6 +511,8 @@ private: std::set > mRequestQueue; std::map mCompletedRequests; + + bool mUseMetaCache; }; #endif // RSGXSDATAACCESS_H diff --git a/libretroshare/src/gxs/rsgxsnetservice.cc b/libretroshare/src/gxs/rsgxsnetservice.cc index 21649e317..934239d61 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.cc +++ b/libretroshare/src/gxs/rsgxsnetservice.cc @@ -926,7 +926,7 @@ void RsGxsNetService::handleRecvSyncGrpStatistics(RsNxsSyncGrpStatsItem *grs) RsGxsGrpMetaTemporaryMap grpMetas; grpMetas[grs->grpId] = NULL; - mDataStore->retrieveGxsGrpMetaData(grpMetas); + mDataStore->retrieveGxsGrpMetaData(grpMetas); const auto& grpMeta = grpMetas[grs->grpId]; @@ -957,7 +957,7 @@ void RsGxsNetService::handleRecvSyncGrpStatistics(RsNxsSyncGrpStatsItem *grs) #ifdef NXS_NET_DEBUG_6 GXSNETDEBUG_PG(grs->PeerId(),grs->grpId) << " retrieving message information." << std::endl; #endif - mDataStore->retrieveGxsMsgMetaData(reqIds, result); + mDataStore->retrieveGxsMsgMetaData(reqIds, result); const auto& vec(result[grs->grpId]) ; @@ -2115,7 +2115,7 @@ void RsGxsNetService::updateServerSyncTS() { RS_STACK_MUTEX(mNxsMutex) ; // retrieve all grps and update TS - mDataStore->retrieveGxsGrpMetaData(gxsMap); + mDataStore->retrieveGxsGrpMetaData(gxsMap); // (cyril) This code was previously removed because it sounded inconsistent: the list of grps normally does not need to be updated when // new posts arrive. The two (grp list and msg list) are handled independently. Still, when group meta data updates are received, @@ -3311,7 +3311,7 @@ void RsGxsNetService::locked_genSendGrpsTransaction(NxsTransaction* tr) } if(!grps.empty()) - mDataStore->retrieveNxsGrps(grps, false, false); + mDataStore->retrieveNxsGrps(grps, false); else { #ifdef NXS_NET_DEBUG_1 @@ -5525,7 +5525,7 @@ bool RsGxsNetService::search(const Sha1CheckSum& hashed_group_id,unsigned char * RsNxsGrpDataTemporaryMap grpDataMap; { RS_STACK_MUTEX(mNxsMutex) ; - mDataStore->retrieveNxsGrps(grpDataMap, true, true); + mDataStore->retrieveNxsGrps(grpDataMap, true); mLastCacheReloadTS = time(NULL); } diff --git a/libretroshare/src/gxs/rsgxsnetservice.h b/libretroshare/src/gxs/rsgxsnetservice.h index 19a12a4d2..b619896b1 100644 --- a/libretroshare/src/gxs/rsgxsnetservice.h +++ b/libretroshare/src/gxs/rsgxsnetservice.h @@ -626,6 +626,8 @@ private: std::map mSearchRequests; std::map mSearchedGroups ; rstime_t mLastCacheReloadTS ; + + bool mUseMetaCache; }; #endif // RSGXSNETSERVICE_H diff --git a/libretroshare/src/gxs/rsgxsutil.cc b/libretroshare/src/gxs/rsgxsutil.cc index 38a4a208e..ca6950fb1 100644 --- a/libretroshare/src/gxs/rsgxsutil.cc +++ b/libretroshare/src/gxs/rsgxsutil.cc @@ -233,7 +233,7 @@ bool RsGxsIntegrityCheck::check(uint16_t service_type, RsGixs *mgixs, RsGeneralD // first take out all the groups std::map grp; - mds->retrieveNxsGrps(grp, true, false); + mds->retrieveNxsGrps(grp, true); GxsMsgReq msgIds; GxsMsgReq grps; @@ -334,7 +334,7 @@ bool RsGxsIntegrityCheck::check(uint16_t service_type, RsGixs *mgixs, RsGeneralD // now messages GxsMsgResult msgs; - mds->retrieveNxsMsgs(grps, msgs, true,false); + mds->retrieveNxsMsgs(grps, msgs, true); // Check msg ids and messages. Go through all message IDs referred to by the db call // and verify that the message belongs to the nxs msg data that was just retrieved. diff --git a/libretroshare/src/gxstrans/p3gxstrans.cc b/libretroshare/src/gxstrans/p3gxstrans.cc index fc2dd425e..e3566b05a 100644 --- a/libretroshare/src/gxstrans/p3gxstrans.cc +++ b/libretroshare/src/gxstrans/p3gxstrans.cc @@ -361,7 +361,7 @@ void p3GxsTrans::GxsTransIntegrityCleanupThread::run() // first take out all the groups std::map grp; - mDs->retrieveNxsGrps(grp, true, true); + mDs->retrieveNxsGrps(grp, true); #ifdef DEBUG_GXSTRANS std::cerr << "GxsTransIntegrityCleanupThread::run()" << std::endl; @@ -389,7 +389,7 @@ void p3GxsTrans::GxsTransIntegrityCleanupThread::run() std::list received_msgs ; GxsMsgResult msgs; - mDs->retrieveNxsMsgs(grps, msgs, true, false); + mDs->retrieveNxsMsgs(grps, msgs, true); for(GxsMsgResult::iterator mit = msgs.begin();mit != msgs.end(); ++mit) {