-
Notifications
You must be signed in to change notification settings - Fork 205
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: refactor manifest to get snapshot in memory #825
feat: refactor manifest to get snapshot in memory #825
Conversation
1c1af66
to
058e57e
Compare
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 solution sounds good. However, there may be one potential problem in it. Here is an example for it:
- The manifest wal is updated;
- Snapshot is triggered;
- Table metadata in the memory is used to form the latest snapshot;
In the step 3, the table metadata (snapshot) may be different from the logs from manifest wal.
5fd66b0
to
3e49670
Compare
…the now unused `SnapshotBuilder`.
3e49670
to
8ff80ed
Compare
In fact, this situation will not be occurred. |
After some thoughts, I'm still worried about that the table metadata in the memory is not controlled by the manifest, that is to say, the order of updating manifest before the table metadata in memory is implicit. Maybe we can extend the TableSnapshotProvider to TabeSnapshotManager which is not only able to provide the latest snapshot but also receive metadata updates. |
I will sovle it in next pr. |
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.
LGTM
* support return snapshot in `TableVersion`. * introdce `TableSnapshotProvider` to get manifest snapshot data from memory. * refactor `Snapshotter` to support from memory or storage. * correct the order between do snapshot and write wal. * fix test in manifest. * let table snapshot provider return None when drop table. * remove `origin_logs_num` from `Snapshot`. * fix compile and clippy. * split `Snapshotter` to `Snapshotter` and `SnapshotRecoverer`, remove the now unused `SnapshotBuilder`. * move `TableSnapshotProviderImpl` to space module.
Which issue does this PR close?
Closes #
Part of #799
Rationale for this change
Make snapshot able to get snapshot from table data.
What changes are included in this PR?
Make snapshot able to get snapshot from table data.
Are there any user-facing changes?
None.
How does this change test
Test by ut.