Skip to content

hotfix: QueryNode handling of membership handle - #4950

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

mnaamani merged 5 commits into
Joystream:masterfrom
mnaamani:qn-member-handle-fix

Conversation

@mnaamani

@mnaamani mnaamani commented Oct 30, 2023 •

Copy link
Copy Markdown
Member

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

Comment thread query-node/mappings/src/membership.ts Outdated

@zeeshanakram3 zeeshanakram3 left a comment

Copy link
Copy Markdown
Contributor

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

@dobertRowneySr dobertRowneySr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM

@dobertRowneySr dobertRowneySr left a comment

Copy link
Copy Markdown
Collaborator

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