mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-03 06:35:08 -04:00
Fixed up bugs in Recogn System - basics work now.
- added missing decrement to DataCount in rsmemcache::erase() - added missing note_event_locked() in rstickevent ... can now use previous tick info, - revamped recogn scheduling. on demand rather than periodic. new function recogn_schedule(). - deferred loading of pgpIdList for pgphashes, until we know it will be needed. git-svn-id: http://svn.code.sf.net/p/retroshare/code/branches/v0.5-gxs_finale@6893 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
cf8a63888b
commit
6871f9875a
4 changed files with 52 additions and 9 deletions
|
@ -204,6 +204,7 @@ template<class Key, class Value> bool RsMemCache<Key, Value>::erase(const Key &k
|
|||
// remove from lru.
|
||||
mDataMap.erase(it);
|
||||
update_lrumap(key, old_ts, new_ts);
|
||||
mDataCount--;
|
||||
|
||||
mStats_access++;
|
||||
return true;
|
||||
|
@ -362,6 +363,12 @@ template<class Key, class Value> bool RsMemCache<Key, Value>::resize()
|
|||
// ERROR.
|
||||
std::cerr << "RsMemCache::resize() CONSISTENCY ERROR";
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\tmDataMap.size() = " << mDataMap.size();
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\tmLruMap.size() = " << mLruMap.size();
|
||||
std::cerr << std::endl;
|
||||
std::cerr << "\tmDataCount = " << mDataCount;
|
||||
std::cerr << std::endl;
|
||||
}
|
||||
|
||||
if (mDataCount > mMaxSize)
|
||||
|
|
|
@ -80,6 +80,7 @@ void RsTickEvent::tick_events()
|
|||
mEvents.erase(it);
|
||||
|
||||
count_adjust_locked(event_type, -1);
|
||||
note_event_locked(event_type);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue