Skip to content

Assert size for interned Value #901

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

Merged
merged 1 commit into from
Jun 6, 2025

Conversation

Veykril
Copy link
Member

@Veykril Veykril commented Jun 4, 2025

No description provided.

Copy link

netlify bot commented Jun 4, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 793dc41
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/68412e6d57c1740008aac042

@Veykril Veykril force-pushed the veykril/push-swmlvltsnpqy branch from 0c3d7cf to 932afa0 Compare June 4, 2025 12:18
Copy link

codspeed-hq bot commented Jun 4, 2025

CodSpeed Performance Report

Merging #901 will not alter performance

Comparing Veykril:veykril/push-swmlvltsnpqy (793dc41) with master (60026c0)

Summary

✅ 12 untouched benchmarks

@Veykril Veykril force-pushed the veykril/push-swmlvltsnpqy branch from 932afa0 to c06feac Compare June 5, 2025 05:39
@Veykril Veykril force-pushed the veykril/push-swmlvltsnpqy branch from c06feac to 793dc41 Compare June 5, 2025 05:43
@MichaReiser
Copy link
Contributor

CC: @ibraheemdev

@Veykril Veykril added this pull request to the merge queue Jun 6, 2025
Merged via the queue into salsa-rs:master with commit 8d3455f Jun 6, 2025
12 checks passed
@Veykril Veykril deleted the veykril/push-swmlvltsnpqy branch June 6, 2025 04:03
@github-actions github-actions bot mentioned this pull request Jun 6, 2025
) -> impl Iterator<Item = &'db Value<C>> {
db.zalsa().table().slots_of::<Value<C>>()
) -> impl Iterator<Item = &'db ValueForConfiguration<C>> {
db.zalsa().table().slots_of::<ValueForConfiguration<C>>()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've been trying to add some debug dumps for memory usage information and was running into some weird segfaults, I think this is the root cause. entries is now incorrect because the type-id assertions is only based on C::Fields, not C. This leads to us returning slots for other interned structs that have identical fields, which shows up specifically for constant query functions fn query(&dyn Db). To prevent this we need Value to have the Configuration generic, do you think we could revert this change? For the size assertion we could create a dummy configuration type.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yes absolutely

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants