Skip to content

storage: EnvStats doesn't include blob file count #156746

@RaduBerinde

Description

@RaduBerinde

stats.TotalFiles = 3 /* CURRENT, MANIFEST, OPTIONS */

	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

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCode not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.branch-release-25.3Used to mark GA and release blockers and technical advisories for 25.3branch-release-25.4Used to mark GA and release blockers and technical advisories for 25.4

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions