Skip to content

hotfix: QueryNode handling of membership handle#4950

Merged
mnaamani merged 5 commits intoJoystream:masterfrom
mnaamani:qn-member-handle-fix
Oct 30, 2023
Merged

hotfix: QueryNode handling of membership handle#4950
mnaamani merged 5 commits intoJoystream:masterfrom
mnaamani:qn-member-handle-fix

Conversation

@mnaamani
Copy link
Copy Markdown
Member

@mnaamani mnaamani commented Oct 30, 2023

Problem:
If member handle has non-valid utf-8 chars and is replaced with the replacement character, two unique (at byte level) handles when converted to string can actually become identical, breaking the uniqueness constraint in the database for the handle column.

Solution:
Update query-node schema to:

  • do best effort converting handle to utf-8 string an store it in non-unique column
  • store raw bytes as hex string in new column

Copy link
Copy Markdown
Contributor

@zeeshanakram3 zeeshanakram3 left a comment

Choose a reason for hiding this comment

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

LGTM

@dobertRowneySr dobertRowneySr self-requested a review October 30, 2023 15:22
Copy link
Copy Markdown
Collaborator

@dobertRowneySr dobertRowneySr left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Copy Markdown
Collaborator

@dobertRowneySr dobertRowneySr left a comment

Choose a reason for hiding this comment

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

ok

@mnaamani mnaamani merged commit e511951 into Joystream:master Oct 30, 2023
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