Skip to content

[AURON #2352] Lock spills before new spiller#2350

Open
wForget wants to merge 2 commits into
apache:masterfrom
wForget:dev
Open

[AURON #2352] Lock spills before new spiller#2350
wForget wants to merge 2 commits into
apache:masterfrom
wForget:dev

Conversation

@wForget

@wForget wForget commented Jun 22, 2026

Copy link
Copy Markdown
Member

Which issue does this PR close?

Closes #2352

Rationale for this change

try_new_spill always uses spills.len as the spill_id, so we should always lock spills before trying_new_spill.

What changes are included in this PR?

Are there any user-facing changes?

How was this patch tested?

@wForget wForget marked this pull request as ready for review June 22, 2026 13:00
@wForget wForget changed the title fix: lock spills before new spiller [AURON #2352] Lock spills before new spiller Jun 23, 2026
@wForget wForget requested a review from richox June 23, 2026 02:59
@cxzl25 cxzl25 requested a review from Copilot June 23, 2026 05:54

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated 2 comments.

Comment on lines +101 to 108
let mut spills = self.spills.lock().await;
let spill = tokio::task::spawn_blocking(move || {
let mut spill = try_new_spill(&spill_metrics)?;
let offsets = data.write(spill.get_buf_writer())?;
Ok::<_, DataFusionError>(Offsetted::new(offsets, spill))
})
.await
.expect("tokio spawn_blocking error")?;
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug: lock spills before new spiller in sort_repartitioner

2 participants