Skip to content

Conversation

@Ayush2k02
Copy link

@Ayush2k02 Ayush2k02 commented Dec 28, 2025

Include document_id in the image hash calculation. Now images from different documents never collide even if their pixel data is similar.

Screen.Recording.2025-12-28.at.7.46.56.PM.mov

Closes #3533

@Ayush2k02 Ayush2k02 changed the title Fix/rasterize node document leakage fix: rasterize node document leakage Dec 28, 2025
let id = row.source_node_id.map(|x| x.0).unwrap_or_else(|| {
let mut state = DefaultHasher::new();
image.data().hash(&mut state);
// Include document_id to prevent hash collisions between documents
Copy link
Contributor

Choose a reason for hiding this comment

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

You can also trivially have collisions within the same document (e.g. by rotating a rectangle with only a thin stroke and a white fill).

I think therefore that it is not viable to hash the images here at all.

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.

Rasterize node: the rasterized image is leaking from one document to another

2 participants