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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user