cockroachdb / cockroachdb/pebble
cache: setting an existing cold entry should make it hot
- Dominant language
- Go
- Stars
- 6k
- Forks
- 584
- Avg merge
- 16h 35m
- Merged PRs (30d)
- 5
Description
See comment in https://github.com/cockroachdb/pebble/pull/4157
```
// TODO(sumeer): unclear why we don't set e.ptype to etHot on this path.
// In the default case below, where the state is etTest we set it to
// etHot. But etTest is "colder" than etCold, since the only transition
// into etTest is etCold => etTest, so since etTest transitions to
// etHot, then etCold should also transition.
```
And @RaduBerinde's response:
I think you're right. The [paper](https://www.usenix.org/legacy/publications/library/proceedings/usenix05/tech/general/full_papers/jiang/jiang_html/html.html) says that if the page isn't in the list it is added as cold (the e == nil case) but if it is "the faulted page turns into a hot page and is placed at the head of the list".
Jira issue: PEBBLE-308
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.