Skip to content

encode node path as UTF-8 in DigestCalculator#2400

Open
jmestwa-coder wants to merge 1 commit into
apache:masterfrom
jmestwa-coder:digestcalculator-path-utf8
Open

encode node path as UTF-8 in DigestCalculator#2400
jmestwa-coder wants to merge 1 commit into
apache:masterfrom
jmestwa-coder:digestcalculator-path-utf8

Conversation

@jmestwa-coder
Copy link
Copy Markdown

calculateDigest hashes the node path with the platform default charset, so a member whose file.encoding is not UTF-8 computes a different digest for the same non-ASCII znode path and raises false digest mismatches. Encode the path as UTF-8, matching the wire format and the rest of the string handling. Bump the digest version so existing snapshots and mixed-version peers skip the comparison during upgrade.

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.

1 participant