-
Notifications
You must be signed in to change notification settings - Fork 281
refine: refine the interface of SnapshotProducer #1490
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
base: main
Are you sure you want to change the base?
Conversation
Hi @ZENOTME , thanks for working on this! I went thru the change and have some general thoughts:
|
Hi @CTTY, Thanks for your review!
According to our current implementation, SnapshotProducer will create using &Table from TransactionAction::commit, so I think there is no case that SnapshotProducer has different table with TransactionAction::commit?
Yes, we can change the interface like
But I think the interface can be more clear if we store Table in snapshot_produce to avoid pass the Table to lots of function around. |
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.
Thanks @ZENOTME for this pr, I'm fine with this change to make things clearer as SnapshotProducer
is used as inner class.
Wait for @CTTY to take another look. |
This is correct. In this case, can we refactor |
cc @ZENOTME Do you want to change it in this pr or do it in following pr? |
Yes, I will change it later |
Which issue does this PR close?
What changes are included in this PR?
This PR refine the interface of SnapshotProducer:
I find that it would convenient when working on merge append: ManifestProcess and SnapshotProduceOperation can be consider as custom extension for SnapshotProducer and they would reuse SnapshotProducer as for common usage. So we should include it in their function param. At the same time, include Table in SnapshotProducer make thing easier they can use SnapshotProducer diretcly.
Are these changes tested?