Skip to content
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

RFD 0003: OOI Hashing #4004

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Open

RFD 0003: OOI Hashing #4004

wants to merge 10 commits into from

Conversation

jpbruinsslot
Copy link
Contributor

@jpbruinsslot jpbruinsslot commented Jan 1, 2025

Markdown rendered version: RFD 0003

@jpbruinsslot jpbruinsslot added the rfd Requests for Discussions label Jan 1, 2025
@jpbruinsslot jpbruinsslot requested a review from a team as a code owner January 1, 2025 15:09
rfd/0003-ooi-hashing.md Outdated Show resolved Hide resolved

# RFD 0003: OOI Hashing

## Background
Copy link
Contributor

Choose a reason for hiding this comment

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

I'd like a little more explanation on why we chose to override the default hashing and implement hashing only on the primary-key fields: Because we cannot have two different objects in the graph with the same primary key, it makes sense to also have the rest of the codebase 'think' they are the same by hashing only those fields that would lead to different objects in the graph.
I'd also like a little more info on why and where this is problematic for the python code itself if we disregard the notion that we can only keep one version of two objects in the database If their primary key is the same.
Furthermore a bit more details on why this specifically is a problem in the context of dealing with Objects in nibbles where we want to 'see' changes on any field that is used/consumed/read/queried by the nibble, regardless of what the primary key's values are. For example, having TTL for a DNSRecord in the primary key is useless for our Graph, but you could still envision a nibble that alerts users of DNSRecords with TTL's that are either too long, or too short. Not being able to see TTL changes (because from the outside the hash of the ooi stayed the same) would mean we only get to run the Nibble once, which is obviously not what you'd want.

n.b. A test nibble doing exactly this (min / max on TTL based on a config) would be a great way of demonstrating this, and adding functionality.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link

sonarqubecloud bot commented Jan 2, 2025

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

Successfully merging this pull request may close these issues.

3 participants