Skip to content

Conversation

@tisonkun
Copy link
Member

See rust-lang/futures-rs#2962

I'm afraid that futures-rs won't release recently, so try to bring the patch here.

What do you think? @Xuanwo @andylokandy

@tisonkun tisonkun requested a review from Xuanwo as a code owner July 26, 2025 15:05
@dosubot dosubot bot added size:L This PR changes 100-499 lines, ignoring generated files. releases-note/fix The PR fixes a bug or has a title that begins with "fix" labels Jul 26, 2025
let merged_bufs: Vec<_> =
stream::iter(merged_ranges.clone().into_iter().map(|v| self.read(v)))
.buffered(self.ctx.options().concurrent())
stream::iter(merged_ranges.clone().into_iter().map(|v| (self.read(v), 1)))
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The second value is size.

Signed-off-by: tison <[email protected]>
Co-authored-by: Andy Lok <[email protected]>
Signed-off-by: tison <[email protected]>
@tisonkun tisonkun force-pushed the fixup-buffered-ordered branch from 820aadf to 8968675 Compare July 26, 2025 15:11
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not comfortable making changes like this in OpenDAL. Please let me try using our existing Executor to resolve it.

@tisonkun
Copy link
Member Author

@Xuanwo do you mean opendal::types::execute::Executor? Let me see ..

@Xuanwo
Copy link
Member

Xuanwo commented Jul 26, 2025

The usage example could be found at:

self.tasks
.execute(WriteInput {
w: self.w.clone(),
executor: self.executor.clone(),
upload_id: upload_id.clone(),
part_number,
bytes,
})
.await?;

@dosubot dosubot bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 27, 2025
Signed-off-by: tison <[email protected]>
@tisonkun tisonkun changed the title fix: patch futures buffer_by_ordered fix: patch futures buffer concurrent Jul 27, 2025
Signed-off-by: tison <[email protected]>
Copy link
Member

@Xuanwo Xuanwo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for working on this

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 27, 2025
@Xuanwo Xuanwo merged commit d0fe478 into main Jul 27, 2025
361 checks passed
@Xuanwo Xuanwo deleted the fixup-buffered-ordered branch July 27, 2025 06:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lgtm This PR has been approved by a maintainer releases-note/fix The PR fixes a bug or has a title that begins with "fix" size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants