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

fix(tianmu): fix specified key was too long; max key length is 255 bytes(#228) #475

Merged
merged 2 commits into from
Sep 14, 2022

Conversation

lujiashun
Copy link

@lujiashun lujiashun commented Sep 8, 2022

fix(tianmu): fix specified key was too long; max key length is 255 bytes(#228)

(1). implement tianmu's virtual function max_supported_key_part_length; (2). enlarge max_supported_key_length's return value from 1024 to 16*1024;

Summary about this PR

Issue Number: close #228
1、tianmu engine limit the max_supported_key_part_length to 255 which is the default storage engine value ;
1.1、 innodb is key-part-length default is 768-1; if set the innobase_large_prefix variables to ture(default is false), key-part-length can be 3072;
1.2. rocksdb's key-part-length default is 767(768-1); if set rocksdb_large_prefix variables to ture(default is false) , key-part-length can be 3072;
1.3、add a system variable tianmu_large_prefix(default values is false,and key-part-length is 767).if the system variable is true, key-part-length is 3072
2、meanwhile tianmu engine limit max_supported_key_length to 1024, while innodb is 3500.
refer to myrock5.6, the max_supported_key_length is 16* 1024, adapt this value。

Tests Check List

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Changelog

  • New Feature
  • Bug Fix
  • Improvement
  • Performance Improvement
  • Build/Testing/CI/CD
  • Documentation
  • Not for changelog (changelog entry is not required)

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features

@mergify
Copy link
Contributor

mergify bot commented Sep 8, 2022

This pull request's title should follow requirements next. @lujiashun please check it 👇.

Valid format:

fix(vc): fix sth..... (#3306)
  ^         ^---------^  ^----^
  |         |            |
  |         +            +-> you issue id.
  |         |
  |         +-> Summary in present tense.
  |
  +-------> Type: feat, fix, docs, workflow, style, refactor, test, website, chore

Valid types:

  • feat: new feature for stonedb
  • fix: bug fix for stonedb
  • docs: changes to the documentation
  • workflow: ci/cd in .github
  • refactor: refactoring production code, eg. renaming a variable
  • style: formatting, missing semi colons, etc; no production code change
  • test: adding missing tests, refactoring tests; no production code change
  • website
  • chore: updating grunt tasks etc; no production code change

@mergify
Copy link
Contributor

mergify bot commented Sep 8, 2022

Thanks for the contribution!
I have applied any labels matching special text in your PR Changelog.

Please review the labels and make any necessary changes.

@mergify mergify bot added the PR-bug bug for pull request label Sep 8, 2022
@lujiashun lujiashun changed the title fix(tianmu): fix specified key was too long; max key length is 255 by… fix(tianmu): fix specified key was too long; max key length is 255 bytes(#228) Sep 8, 2022
…tes(stoneatom#228)

(1). implement tianmu's virtual function max_supported_key_part_length;
(2). enlarge max_supported_key_length's return value from 1024 to 16*1024;
Copy link
Contributor

@RingsC RingsC left a comment

Choose a reason for hiding this comment

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

LGTM

@RingsC RingsC requested a review from adofsauron September 14, 2022 05:35
Copy link
Collaborator

@adofsauron adofsauron left a comment

Choose a reason for hiding this comment

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

LGTM

@mergify mergify bot merged commit ae8dc05 into stoneatom:stonedb-5.7-dev Sep 14, 2022
@lujiashun lujiashun deleted the fix/228 branch September 21, 2022 09:12
@Nliver Nliver added this to the StoneDB_5.7_v1.0.1 milestone Apr 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
PR-bug bug for pull request
Projects
Development

Successfully merging this pull request may close these issues.

bug: specified key was too long; max key length is 255 bytes(innodb does not report errors)
4 participants