-
Notifications
You must be signed in to change notification settings - Fork 206
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
feat: persist AlterSchema
and AlterOptions
to data WAL
#166
Merged
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
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
waynexia
added
feature
New feature or request
A-analytic-engine
Area: Analytic Engine
labels
Aug 4, 2022
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
ShiKaiWi
approved these changes
Aug 5, 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.
Well done!
chunshao90
pushed a commit
to chunshao90/ceresdb
that referenced
this pull request
May 15, 2023
* feat: move schema out from manifest Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * change the AlterSchema persist destination to Wal Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * AlterSchema decodeing Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * impl alter options; store update to Manifest as well Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * update mod doc Signed-off-by: Ruihang Xia <waynestxia@gmail.com> * fix decoding header Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Which issue does this PR close?
Closes #82
Rationale for this change
quote from #82:
This PR focus on the second target -- put DDL (altering schema and options) together with data WAL.
A more detailed reason is that in distributed mode, we have a writer node and serval reader nodes. Where the writer serves all the related write requests, including writing data and altering schema/options. And readers sync new data from their writer. They communicate with data WAL. However, the data WAL used only contains the data logs. This is problematic when for example, the schema is changing. Readers don't know at which point the schema has changed, and therefore cannot handle their memory status correctly.
After this patch readers can know when to update their schema and/or options. Those DDL records are associated with data records.
Besides this, those DDL records still exist in the Manifest. I.e. this PR doesn't touch the Manifest. I haven't found a better place to put those metadata. This kind of data changes frequently thus OSS is not a good choice.
What changes are included in this PR?
Duplicate
AlterSchema
andAlterOptions
to data WALAre there any user-facing changes?
No, all changes are internal.
How does this change test
Unit test