Skip to content

LLO telemetry: drop old buffered seqNrs - #23558

Open
denis-chernov-smartcontract wants to merge 1 commit into
developfrom
DS/llo-telemetry-fix
Open

LLO telemetry: drop old buffered seqNrs#23558
denis-chernov-smartcontract wants to merge 1 commit into
developfrom
DS/llo-telemetry-fix

Conversation

@denis-chernov-smartcontract

Copy link
Copy Markdown
Contributor

Requires

Supports

@denis-chernov-smartcontract denis-chernov-smartcontract added the build-publish Build and Publish image to SDLC label Aug 27, 2026
@github-actions

Copy link
Copy Markdown
Contributor

👋 denis-chernov-smartcontract, thanks for creating this pull request!

To help reviewers, please consider creating future PRs as drafts first. This allows you to self-review and make any final changes before notifying the team.

Once you're ready, you can mark it as "Ready for review" to request feedback. Thanks!

@github-actions

Copy link
Copy Markdown
Contributor

✅ No conflicts with other open PRs targeting develop

@github-actions

Copy link
Copy Markdown
Contributor

I see you updated files related to core. Please run make gocs in the root directory to add a changeset as well as in the text include at least one of the following tags:

  • #added For any new functionality added.
  • #breaking_change For any functionality that requires manual action for the node to boot.
  • #bugfix For bug fixes.
  • #changed For any change to the existing functionality.
  • #db_update For any feature that introduces updates to database schema.
  • #deprecation_notice For any upcoming deprecation functionality.
  • #internal For changesets that need to be excluded from the final changelog.
  • #nops For any feature that is NOP facing and needs to be in the official Release Notes for the release.
  • #removed For any functionality/config that is removed.
  • #updated For any functionality that is updated.
  • #wip For any change that is not ready yet and external communication about it should be held off till it is feature complete.

@cl-sonarqube-production

Copy link
Copy Markdown

@trunk-io

trunk-io Bot commented Aug 27, 2026

Copy link
Copy Markdown

Static BadgeStatic BadgeStatic Badge

View Full Report ↗︎Docs

// evictOldestSeqNrsLocked drops the oldest buffered seqNrs for digest until
// at most maxBufferedSeqNrsPerDigest remain. Callers must hold
// telemetryBufferMu.
func (t *telemeter) evictOldestSeqNrsLocked(digest string) {

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Currently, these 2 for loops run in time O(N*N) where N = len(digestMessages), but this does not seem to be necessary. We want to drop smallest digestMessages seq, until we have maxBufferedSeqNrsPerDigest left. This can be done in O(N) time, you first find the maxBufferedSeqNrsPerDigest-smallest element, and then drop all the elements bigger than it.

@brunotm
brunotm enabled auto-merge August 29, 2026 15:42
@brunotm
brunotm disabled auto-merge August 29, 2026 15:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

build-publish Build and Publish image to SDLC

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants