GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Fix: log only once the warning in DefRemoteRepoMan by cstamas · Pull Request #2100 · apache/maven-resolver

Conversation

@cstamas

@cstamas cstamas commented Aug 31, 2026

Copy link
Copy Markdown
Member

As current code on master logs overwhelming amount of WARNs onto console

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@cstamas
Fix: log only once the warning in DefRemoteRepoMan
3ace822
as current code logs overhwelming about of WARNs onto console
@cstamas cstamas added this to the 2.0.23 milestone Aug 31, 2026
@cstamas
cstamas requested review from gnodet and slachiewicz August 31, 2026 12:36
@cstamas cstamas self-assigned this Aug 31, 2026
@cstamas cstamas added the enhancement New feature or request label Aug 31, 2026
@cstamas
cstamas marked this pull request as ready for review August 31, 2026 12:37
gnodet
gnodet approved these changes Aug 31, 2026
View reviewed changes

@gnodet gnodet left a comment

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Clean, well-scoped fix that deduplicates two WARN-level log messages using session-scoped tracking via SessionData and ConcurrentHashMap. The approach is consistent with the existing logMirror pattern and correctly uses SessionData (always available) rather than RepositoryCache (can be null).

Thread safety is ensured through SessionData.computeIfAbsent returning a shared ConcurrentHashMap, and ConcurrentHashMap.computeIfAbsent guaranteeing at-most-once execution per key. Both WARN call sites on master are converted — no sites were missed.

Minor observations (non-blocking):

  • logWarnOnce does not guard with isWarnEnabled() before computing the key (the existing logMirror guards with isDebugEnabled()). In practice WARN is almost always enabled, so the overhead is negligible.

This review was generated by an AI agent and may contain inaccuracies. Please verify all suggestions before applying.

Claude Code on behalf of gnodet

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
gnodet added a commit to gnodet/maven-resolver that referenced this pull request Aug 31, 2026
@gnodet
Review loop: reviewed PRs apache#2100, apache#2101 (2026-08-31T13:36:…
bd6b259
…57Z)
@cstamas
Bail out when logging not needed.
fac5f89
@cstamas
cstamas merged commit 02fbe5c into apache:master Aug 31, 2026
1 check passed

Uh oh!

There was an error while loading. Please reload this page.

@cstamas
cstamas deleted the log-once-defrepoman branch August 31, 2026 13:55
@slachiewicz slachiewicz mentioned this pull request Sep 1, 2026
[1.9.x] Log the descriptor-repository authentication warning once per session #2110
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@gnodet gnodet gnodet approved these changes
@slachiewicz slachiewicz Awaiting requested review from slachiewicz

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@cstamas cstamas

Labels

enhancement New feature or request

Projects

None yet

Milestone

2.0.23

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@cstamas @gnodet
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.