Skip to content

db: DB.SSTables misreports virtual table properties #4573

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jbowens opened this issue Apr 17, 2025 · 0 comments · May be fixed by #4676
Open

db: DB.SSTables misreports virtual table properties #4573

jbowens opened this issue Apr 17, 2025 · 0 comments · May be fixed by #4676

Comments

@jbowens
Copy link
Collaborator

jbowens commented Apr 17, 2025

It just blindly reports the properties of the underlying backing sstable. I think we should use GetScaledProperties and include just the scaled CommonProperties for virtual tables.

pebble/db.go

Lines 2250 to 2264 in ae9f98c

if opt.withProperties {
p, err := d.fileCache.getTableProperties(
m,
)
if err != nil {
return nil, err
}
destTables[j].Properties = p
}
destTables[j].Virtual = m.Virtual
destTables[j].BackingSSTNum = m.FileBacking.DiskFileNum
objMeta, err := d.objProvider.Lookup(base.FileTypeTable, m.FileBacking.DiskFileNum)
if err != nil {
return nil, err
}

Jira issue: PEBBLE-409

@jbowens jbowens changed the title db: DB.SSTables misreports virtual table properties, sizes db: DB.SSTables misreports virtual table properties Apr 17, 2025
@annrpom annrpom self-assigned this Apr 30, 2025
annrpom added a commit to annrpom/pebble that referenced this issue May 1, 2025
We now include just the scaled `CommonProperties` for virtual tables.

Fixes: cockroachdb#4573
annrpom added a commit to annrpom/pebble that referenced this issue May 1, 2025
We now include just the scaled `CommonProperties` for virtual tables.

Fixes: cockroachdb#4573
@annrpom annrpom linked a pull request May 1, 2025 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants