-
-
Notifications
You must be signed in to change notification settings - Fork 0
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
chore(grouping): migration for hnsw index #870
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should turn ingestion off before merging this, just to be safe and observe what the database does
i've updated my migration so it applies concurrently, we should be good to apply without pausing ingestion |
I've updated this migration to do the following:
I've also made this apply in a single txn rather than concurrently, with the intention being that we run this with ingestion paused. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Added a couple of comments but neither are necessarily blocking, especially since this table won't be used until a followup migration swaps it out
message VARCHAR NOT NULL, | ||
error_type VARCHAR, | ||
stacktrace_embedding VECTOR(768) NOT NULL, | ||
PRIMARY KEY (id, project_id) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, just noticed this - should this be just id
? If feels surprising that id
wouldn't be unique
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is necessary for hash partitioning AFAIK (cant hash partition on something that isnt PK)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ahh, that makes sense.
If we have any places where we're querying with only an id
we should see what the query planner does - theoretically the id, project_id
index should be able to be applied to just an id
query but I'm not super familiar with how partitioning affects that.
Co-authored-by: Matt Duncan <14761+mrduncan@users.noreply.github.com>
DO NOT MERGE/APPLY UNTIL WE HAVE VERIFIED #870
based on analysis here