cockroachdb / cockroachdb/cockroach
storage: EnvStats doesn't include blob file count
- Dominant language
- Go
- Stars
- 32.5k
- Forks
- 4.1k
- PR merge metrics
- PR metrics pending
Description
https://github.com/cockroachdb/cockroach/blob/cc61b3c16062dfeef5ee82e6a80d868d499e047e/pkg/storage/pebble.go#L2051
```
m := p.db.Metrics()
stats.TotalFiles = 3 /* CURRENT, MANIFEST, OPTIONS */
stats.TotalFiles += uint64(m.WAL.Files) + m.Table.Zombie.All.Count + uint64(m.WAL.ObsoleteFiles) + m.Table.Obsolete.All.Count
stats.TotalBytes = m.WAL.Size + m.Table.Zombie.All.Bytes + m.Table.Obsolete.All.Bytes
for _, l := range m.Levels {
stats.TotalFiles += l.Tables.Count
stats.TotalBytes += l.Tables.Bytes
}
```
I am refactoring and fixing this code on master; filing this issue to track a small fix on 25.4 and 25.3.
Jira issue: CRDB-56166
Contributor guide
Assessment
This issue has not been assessed yet.