Skip to content

Conversation

@fmaste
Copy link
Contributor

@fmaste fmaste commented Nov 12, 2025

Description

  • writeToSink: remove the usage of two TBQeue of different sizes, in practice it is always allowed to grow to the maximum size and that behavior implies copying trace objects.
  • readFromSink: make the code clearer, only one atomically and a single length query and the retry mechanism easier to understand.
  • In both cases make clearer the STM and the non STM portions of the code.
  • The wasUsed flag is not used and can be removed.
  • No new TBQeue is created, remove the TVar holding it as there is no more sync needed.

Checklist

  • Commit sequence broadly makes sense and commits have useful messages
  • New tests are added if needed and existing tests are updated. These may include:
    • golden tests
    • property tests
    • roundtrip tests
    • integration tests
      See Runnings tests for more details
  • Any changes are noted in the CHANGELOG.md for affected package
  • The version bounds in .cabal files are updated
  • CI passes. See note on CI. The following CI checks are required:
    • Code is linted with hlint. See .github/workflows/check-hlint.yml to get the hlint version
    • Code is formatted with stylish-haskell. See .github/workflows/stylish-haskell.yml to get the stylish-haskell version
    • Code builds on Linux, MacOS and Windows for ghc-9.6 and ghc-9.12
  • Self-reviewed the diff

Note on CI

If your PR is from a fork, the necessary CI jobs won't trigger automatically for security reasons.
You will need to get someone with write privileges. Please contact IOG node developers to do this
for you.

@fmaste fmaste force-pushed the fmaste/trace-forward branch 7 times, most recently from dc70763 to 5f9c4e1 Compare November 13, 2025 17:24
@fmaste fmaste changed the title Fmaste/trace forward trace forward | optimizations Nov 13, 2025
@fmaste fmaste changed the title trace forward | optimizations trace-forward | sink write and read optimizations Nov 13, 2025
@fmaste fmaste marked this pull request as ready for review November 13, 2025 17:27
@fmaste fmaste requested a review from a team as a code owner November 13, 2025 17:27
@fmaste fmaste force-pushed the fmaste/trace-forward branch 4 times, most recently from d277cd6 to d08139e Compare November 14, 2025 14:59
@fmaste fmaste force-pushed the fmaste/trace-forward branch from d08139e to cb665d0 Compare November 14, 2025 15:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants