row_cache: Don't invalidate references on insertion

modification_count is currently only used to detect invalidation of
references, intended to be incremented on erasure.

Insertion into intrusive set doesn't invalidate references, so no
need to increment the counter.
This commit is contained in:
Tomasz Grabiec
2017-09-07 19:54:01 +02:00
parent 87be474c19
commit 27a3b4bca9
2 changed files with 1 additions and 5 deletions

View File

@@ -153,7 +153,6 @@ void cache_tracker::touch(cache_entry& e) {
void cache_tracker::insert(cache_entry& entry) {
++_stats.partition_insertions;
++_stats.partitions;
++_stats.modification_count;
_lru.push_front(entry);
}

View File

@@ -355,10 +355,7 @@ private:
previous_entry_pointer() = default; // Represents dht::ring_position_view::min()
previous_entry_pointer(dht::decorated_key key) : _key(std::move(key)) {};
// TODO: Currently inserting an entry to the cache increases
// modification counter. That doesn't seem to be necessary and if we
// didn't do that we could store iterator here to avoid key comparison
// (not to mention avoiding lookups in just_cache_scanning_reader.
// TODO: store iterator here to avoid key comparison
};
template<typename CreateEntry, typename VisitEntry>