-
Notifications
You must be signed in to change notification settings - Fork 599
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
fix: list one page in fs source executor #20292
Conversation
This pull request has been modified. If you want me to regenerate unit test for any of the files related, please find the file in "Files Changed" tab and add a comment |
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, and we may deprecate origin s3 source later.
Co-authored-by: tabversion <[email protected]>
Co-authored-by: tabversion <[email protected]>
Co-authored-by: Bohan Zhang <[email protected]> Co-authored-by: tabversion <[email protected]>
async fn list_splits(&mut self) -> crate::error::ConnectorResult<Vec<Self::Split>> { | ||
let mut objects = Vec::new(); | ||
loop { | ||
let (files, has_finished) = self.get_next_page::<FsSplit>().await?; | ||
objects.extend(files); | ||
if has_finished { | ||
break; | ||
} | ||
} | ||
Ok(objects) | ||
// fetch one page as validation, no need to get all pages | ||
let (_, _) = self.get_next_page::<FsSplit>().await?; | ||
|
||
Ok(vec![FsSplit { | ||
name: "empty_split".to_owned(), | ||
offset: 0, | ||
size: 0, | ||
}]) | ||
} |
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.
Is this correct for legacy s3 enumerator? IIUC its splits need to be enumerated in meta 🤔
Signed-off-by: tabversion <[email protected]> Co-authored-by: Bohan Zhang <[email protected]> Co-authored-by: tabversion <[email protected]>
I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.
What's changed and what's your intention?
as title, we don't need to list all files in fs source enuerator
Checklist
Documentation
Release note