-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Forbid adding schema properties if they existed before #5130
Merged
Sophie-Xie
merged 8 commits into
vesoft-inc:master
from
wenhaocs:haowen/check_history_schmea
Dec 29, 2022
Merged
Forbid adding schema properties if they existed before #5130
Sophie-Xie
merged 8 commits into
vesoft-inc:master
from
wenhaocs:haowen/check_history_schmea
Dec 29, 2022
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
wenhaocs
added
type/bug
Type: something is unexpected
ready-for-testing
PR: ready for the CI test
labels
Dec 28, 2022
wenhaocs
force-pushed
the
haowen/check_history_schmea
branch
from
December 29, 2022 07:38
c245384
to
c969404
Compare
critical27
reviewed
Dec 29, 2022
@@ -573,16 +573,17 @@ SchemaVer MetaKeyUtils::parseEdgeVersion(folly::StringPiece key) { | |||
*reinterpret_cast<const SchemaVer*>(key.begin() + offset); | |||
} | |||
|
|||
SchemaVer MetaKeyUtils::getLatestEdgeScheInfo(kvstore::KVIterator* iter, folly::StringPiece& val) { | |||
SchemaVer MetaKeyUtils::getLatestEdgeScheInfo( | |||
kvstore::KVIterator* iter, std::unordered_map<SchemaVer, folly::StringPiece>& schemasRaw) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe rename to schemaHistory or something else?
critical27
approved these changes
Dec 29, 2022
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good job~
SuperYoko
approved these changes
Dec 29, 2022
11 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
doc affected
PR: improvements or additions to documentation
ready for review
ready-for-testing
PR: ready for the CI test
type/bug
Type: something is unexpected
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What type of PR is this?
What problem(s) does this PR solve?
Issue(s) number:
Case 1 in #2671
Description:
When we change schema, the existing data will not be changed. In case 1 above, if a user adds a column/property back (with the same name, but has different attributes) after dropping it, querying the existing data will show the properties under the old schema, not matching the new schema. Per discussion, we just forbid adding column/property back with the same name.
How do you solve it?
Special notes for your reviewer, ex. impact of this fix, design document, etc:
Checklist:
Tests:
Affects:
Release notes:
Please confirm whether to be reflected in release notes and how to describe: