Skip to content

Core: handle missing bidder entries when merging rejection trackers - #4689

Closed
aleksUIX wants to merge 1 commit into
prebid:masterfrom
aleksUIX:fix/secondary-bidder-tracker-merge-4686
Closed

aleksUIX wants to merge 1 commit into
prebid:masterfrom
aleksUIX:fix/secondary-bidder-tracker-merge-4686

Conversation

@aleksUIX

Copy link
Copy Markdown

Type of changes

  • bugfix

Context

A copied rejection-tracker key with neither an original tracker nor a bidder response future produces a null merge value. Collectors.toMap then aborts the auction with the NPE reported in #4686.

Filter those copied-only keys before merging. Keep existing tracker records for blocked bidders, completed responses and timeout isolation for unfinished secondary bidders.

Rationale

An unknown copied key has no original rejection state or auction participation to retain. Reusing its copied tracker would import state outside the completed bidder set. The guard excludes it without changing known-bidder reconciliation.

The regression reproduces the mismatch through the auction postprocessor seam. The operator's original production request remains unavailable.

Test plan

  • The new auction regression fails on unchanged master and passes with the guard.
  • All 124 ExchangeService tests pass.
  • The required mvn -B package --file extra/pom.xml build passed with JDK 25: 9,560 tests, zero failures or errors, two existing skips. Upstream advanced only release-version metadata afterward; the Java sources are identical, and all 124 exchange tests pass again on the refreshed head.
  • Both changed executable lines and their four branches have 100% JaCoCo coverage. Checkstyle reports zero violations.
  • An initial package run hit an unrelated hook timing assertion. The complete hook suite and the complete package build passed on rerun without test changes.

Quality check

  • Existing code style followed.
  • No API or configuration changes.
  • Changed-code coverage exceeds 90%.
  • No debug output added.

Fixes #4686.

@osulzhenko
osulzhenko requested review from CTMBNara and Lightwood13 and removed request for CTMBNara and Lightwood13 October 27, 2026 10:27
@And1sS

And1sS commented Oct 27, 2026

Copy link
Copy Markdown
Collaborator

Hello, I suspect that you may have a custom module that populates the bid rejection tracker internally. Perhaps you populated the tracker at the BidderRequest stage with an entry for a bidder that does not participate in the current auction. Please, provide us with more context so that we can understand problem better.

@zxPhoenix

Copy link
Copy Markdown
Contributor

Hello, I suspect that you may have a custom module that populates the bid rejection tracker internally. Perhaps you populated the tracker at the BidderRequest stage with an entry for a bidder that does not participate in the current auction. Please, provide us with more context so that we can understand problem better.

Hi @And1sS, I reported this issue, and you were right: the NPE is just a symptom. After investigating further, I found that our not obvious customization caused the issue. The standard Prebid Server code isn’t affected, so I think you can close this.

@aleksUIX

Copy link
Copy Markdown
Author

Closing this. @zxPhoenix traced the NPE in #4686 to their own customization, which adds a tracker entry for a bidder that is not in the auction. That matches @And1sS's read. Without a reproduction on standard Prebid Server Java, this guard is not needed upstream.

@aleksUIX aleksUIX closed this Oct 29, 2026
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.

Secondary bidder: NPE while merging bid rejection trackers

3 participants