-
Notifications
You must be signed in to change notification settings - Fork 753
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
refactor: SchemaApi::get_table_meta_history() #16586
Conversation
d8ef913
to
686391b
Compare
let metas = get_table_meta_history(self, &now, table_id_list).await?; | ||
history_ident: &TableIdHistoryIdent, | ||
) -> Result<Vec<(TableId, SeqV<TableMeta>)>, MetaError> { | ||
let Some(seq_table_id_list) = self.get_pb(history_ident).await? else { |
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.
So this means : if a table under a db which contains 100 tables is invalid, list table from this db will return empty result?
cc @flaneur2020
I think it's better to print a warn or error log to point the err.
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 do think so. 🤔
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.
my mistake。the method name should be get-retainable-x x x
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.
Fixed. Please review it again
It does not need to accept a `database-name` argument just for building an error. It does not need to return application level error: if a table is not found, just return an empty list. Rename SchemaApi::get_tables_history to list_retainable_tables; Rename SchemaApi::get_table_meta_history to get_retainable_tables; refactor: rename list_tables_history->list_gc_ready_tables;get_table_meta_history->get_gc_ready_tables;
686391b
to
b76a7ab
Compare
I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/
Summary
refactor: SchemaApi::get_table_meta_history()
It does not need to accept a
database-name
argument just for buildingan error.
It does not need to return application level error: if a table is not
found, just return an empty list.
Tests
Type of change
Related Issues
This change is