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

[Bug] Remove schema hash and fix bug of calculating table signature #5254

Merged
merged 5 commits into from
Jan 20, 2021

Conversation

morningman
Copy link
Contributor

Proposed changes

  1. Schema hash is useless long time ago
    Currently, schema hash can only be generated as a random integer, no need to calculated
    from real schema.

  2. The CRC32 algo is not enough to generate the table' signature.
    Table's signature is used to determine whether the tables have the same schema.
    And current CRC32 algo may return same signature even if table's schema are different.

    So I change it to calculate the md5 of a signature string assambled by schema info of a table.

Types of changes

  • Bugfix (non-breaking change which fixes an issue)

@morningman morningman added kind/fix Categorizes issue or PR as related to a bug. kind/refactor Issues or PRs to refactor code labels Jan 17, 2021
@morningman morningman self-assigned this Jan 17, 2021
@morningman morningman marked this pull request as draft January 17, 2021 11:24
@morningman morningman marked this pull request as ready for review January 17, 2021 11:51
Copy link
Contributor

@EmmyMiao87 EmmyMiao87 left a comment

Choose a reason for hiding this comment

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

LGTM

@EmmyMiao87 EmmyMiao87 added the approved Indicates a PR has been approved by one committer. label Jan 18, 2021
@morningman morningman merged commit b25bcee into apache:master Jan 20, 2021
EmmyMiao87 pushed a commit to EmmyMiao87/incubator-doris that referenced this pull request Jan 26, 2021
…pache#5254)

1. Schema hash is useless long time ago
    Currently, schema hash can only be generated as a random integer, no need to calculated
    from real schema.

2. The CRC32 algo is not enough to generate the table' signature.
    Table's signature is used to determine whether the tables have the same schema.
    And current CRC32 algo may return same signature even if table's schema are different.

    So I change it to calculate the md5 of a signature string assembled by schema info of a table.

Change-Id: Iae199e63087e8db235e7f6835dd528a6316e9263
@yangzhg yangzhg mentioned this pull request Feb 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by one committer. kind/fix Categorizes issue or PR as related to a bug. kind/refactor Issues or PRs to refactor code
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants