Skip to content

Use latest revision for dependencies on interned values #908

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 11, 2025

Conversation

ibraheemdev
Copy link
Contributor

Resolved #904.

Copy link

netlify bot commented Jun 10, 2025

Deploy Preview for salsa-rs canceled.

Name Link
🔨 Latest commit 898343c
🔍 Latest deploy log https://app.netlify.com/projects/salsa-rs/deploys/6848ae3b830b84000947a50e

Copy link

codspeed-hq bot commented Jun 10, 2025

CodSpeed Performance Report

Merging #908 will not alter performance

Comparing ibraheemdev:ibraheem/interned-dependencies (898343c) with master (8924db1)

Summary

✅ 12 untouched benchmarks

@Veykril Veykril added this pull request to the merge queue Jun 11, 2025
Merged via the queue into salsa-rs:master with commit dc9066d Jun 11, 2025
12 checks passed
@github-actions github-actions bot mentioned this pull request Jun 11, 2025
zalsa_local.report_tracked_read_simple(
index,
value_shared.durability,
Revision::start(),
current_revision,
Copy link
Contributor

@MichaReiser MichaReiser Jun 11, 2025

Choose a reason for hiding this comment

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

I think this change technically means that, for any query creating or depending on a query creating interned values, this path can no longer be taken.

https://github.com/MichaReiser/salsa/blob/8d3455f0e6451c0dd6f88412db2aa9c49f41bc3f/src/function/maybe_changed_after.rs#L169-L176

Ideally, we'd use first_interned_at because that's since when this query hasn't changed. But we no longer track this for interned values. We could use last_interned_at (before it gets updated) but that seems a bit hacky because it only does the "backdating" for the query first validating the interned value.

Maybe something to discuss during todays meeting: Whether we want to bring back first_interned_at or if there's another way to avoid using current_revision here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wasn't sure if first_interned_at was correct even for this case, but I agree that it is, because if the slot was recreated in a new revision because of garbage collection that must have happened after the initial creation, which is sufficient to update the memo.

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.

Crash after interned reuse
3 participants