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.
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
meta: support storing placement policy into meta #27251
meta: support storing placement policy into meta #27251
Changes from 34 commits
c5efcdd
6ebb9f7
f982dcb
02db37d
fa317e4
a434c68
1ded57e
91f1d79
643499d
e9c33de
842a6b6
ff7dcf0
ca1312e
bd19369
3896af7
70aab7a
bfcbcf4
2e64f19
d96affa
9c931eb
6c977aa
ab6720b
bcb66cb
199c22a
ffb8605
1815aca
e23ea18
3be7de8
dae2b36
2c7e5a3
5dd8798
7d5a966
92232f8
f1f3924
9df17d0
d318359
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
Can you explain how should we use the magic byte in the future? Does it means if the
byte <= 0x3F
they must be compatible each other? For example 0x3F can read the data with byte 0x0 and 0x0 can read the data with byte 0x3F too. If we want to make an incompatible version, the byte must be upgraded to > 0x3F? And it can still be in json format, but ... incompatible.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.
This point comes from wanghe. (like magic byte in Java class file)
Appending fields is naturally compatible with old version, so we don't have to change magic byte. For extreme case, modifying a old field will cause misunderstanding between versions, in which we should change the magic byte + 0x01, that told new / old version to handling in a new way / just throw a error, but it should be still in the json handler-range.
In other extreme case, one day we may use msgpack/yaml/other-serialization-format instead, where we should change the magic byte to other reserved corresponding range.
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.
I see, but for the code:
It does not make any error only if the magic number < 0x3F. Does it mean new versions must be compatible with old version if their magic numbers are in the same range.
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.
sure, nice catch
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.
done