Skip to content

join ops before in format#6370

Merged
blaginin merged 4 commits intodevelopfrom
db/fix-format
Feb 10, 2026
Merged

join ops before in format#6370
blaginin merged 4 commits intodevelopfrom
db/fix-format

Conversation

@blaginin
Copy link
Member

@blaginin blaginin commented Feb 9, 2026

when there are several subscribers, i get:

 thread '...' (7476) panicked at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.14.0/src/format.rs:95:21:
    Format: was already formatted once
    stack backtrace:
       0: std::panicking::begin_panic
                 at /rustc/c23ed3ef28b3cc30658310f771ddc66e5b687cf4/library/std/src/panicking.rs:762:5
       1: <itertools::format::Format<core::slice::iter::Iter<alloc::string::String>>>::format
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.14.0/src/format.rs:95:21
       2: <itertools::format::Format<core::slice::iter::Iter<alloc::string::String>> as core::fmt::Display>::fmt
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/itertools-0.14.0/src/format.rs:119:26
       3: core::fmt::rt::Argument::fmt
                 at /rustc/c23ed3ef28b3cc30658310f771ddc66e5b687cf4/library/core/src/fmt/rt.rs:152:76
       4: core::fmt::write
       5: <&dyn core::fmt::Debug as core::fmt::Debug>::fmt
                 at /home/runner/.rustup/toolchains/nightly-2025-11-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:2865:62
       6: core::fmt::rt::Argument::fmt
                 at /rustc/c23ed3ef28b3cc30658310f771ddc66e5b687cf4/library/core/src/fmt/rt.rs:152:76
       7: core::fmt::write
       8: <&mut tracing_subscriber::fmt::format::escape::EscapingWriter as core::fmt::Write::write_fmt::SpecWriteFmt>::spec_write_fmt
                 at /home/runner/.rustup/toolchains/nightly-2025-11-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:236:21
       9: <tracing_subscriber::fmt::format::escape::EscapingWriter as core::fmt::Write>::write_fmt
                 at /home/runner/.rustup/toolchains/nightly-2025-11-24-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/fmt/mod.rs:241:14
      10: <tracing_subscriber::fmt::format::escape::Escape<&dyn core::fmt::Debug> as core::fmt::Debug>::fmt
                 at /home/runner/.cargo/registry/src/index.crates.io-1949cf8c6b5b557f/tracing-subscriber-0.3.22/src/fmt/format/escape.rs:42:9
      11: core::fmt::rt::Argument::fmt
                 at /rustc/c23ed3ef28b3cc30658310f771ddc66e5b687cf4/library/core/src/fmt/rt.rs:152:76
      12: core::fmt::write
      13: <&mut alloc::string::String as core::fmt::Write::write_fmt::SpecWriteFmt>::spec_write_fmt

Signed-off-by: blaginin <github@blaginin.me>
@blaginin blaginin requested a review from gatesn February 9, 2026 15:57
@blaginin blaginin self-assigned this Feb 9, 2026
@blaginin blaginin added the changelog/fix A bug fix label Feb 9, 2026
Signed-off-by: blaginin <github@blaginin.me>
@blaginin blaginin enabled auto-merge (squash) February 9, 2026 16:04
Comment on lines 120 to 121
let trace = self.ops.join("\n");
tracing::debug!("exec[{}] trace:\n{}", self.id, trace);
Copy link
Contributor

Choose a reason for hiding this comment

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

can we do this without a string alloc?

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 9, 2026

CodSpeed Performance Report

Merging this PR will degrade performance by 25.39%

Comparing db/fix-format (25f3912) with develop (28acfa4)

Summary

❌ 1 regressed benchmark
✅ 1137 untouched benchmarks
⏩ 1265 skipped benchmarks1

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
Simulation chunked_bool_into_canonical[(1000, 10)] 66 µs 88.4 µs -25.39%

Footnotes

  1. 1265 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports.

@codspeed-hq
Copy link

codspeed-hq bot commented Feb 9, 2026

Unable to generate the performance report

There was an internal error while processing the run's data. We're working on fixing the issue. Feel free to contact us on Discord or at support@codspeed.io if the issue persists.

Signed-off-by: blaginin <github@blaginin.me>
fn drop(&mut self) {
if !self.ops.is_empty() {
tracing::debug!("exec[{}] trace:\n{}", self.id, self.ops.iter().format("\n"));
if !self.ops.is_empty() && tracing::enabled!(tracing::Level::DEBUG) {
Copy link
Contributor

Choose a reason for hiding this comment

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

self.ops.iter().format("\n") with itertools?

Copy link
Member Author

Choose a reason for hiding this comment

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

that's why this bug happened in the first place :D similar to prefix-dev/pixi#4938

Copy link
Contributor

Choose a reason for hiding this comment

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

I thought this was fixed?

Copy link
Contributor

Choose a reason for hiding this comment

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

haha okay

@blaginin blaginin merged commit d1097c5 into develop Feb 10, 2026
48 of 50 checks passed
@blaginin blaginin deleted the db/fix-format branch February 10, 2026 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants