Skip to content

GH-1768 Drastically simplify auth caching#1790

Merged
cstamas merged 3 commits intoapache:maven-resolver-1.9.xfrom
cstamas:maven-resolver-1.9.x-issue-1768
Feb 12, 2026
Merged

GH-1768 Drastically simplify auth caching#1790
cstamas merged 3 commits intoapache:maven-resolver-1.9.xfrom
cstamas:maven-resolver-1.9.x-issue-1768

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Feb 10, 2026

As there is a reproducible issue for proxy auth cache. Seems auth cache fall apart in the moment non-single thread flow happens. Instead to chase and wrap around our head, I just went to drastically simplify the whole stuff, without dropping any existing feature, and making sure that reproducer does not reproduce anymore.

Fixes #1768

As there is a reproducible issue for proxy auth cache.

Fixes apache#1768
@cstamas cstamas self-assigned this Feb 10, 2026
@cstamas cstamas added the bug Something isn't working label Feb 10, 2026
@cstamas
Copy link
Member Author

cstamas commented Feb 10, 2026

This needs to be ported to master as well

@cstamas cstamas requested a review from gnodet February 10, 2026 14:55
@cstamas cstamas added this to the 1.9.26 milestone Feb 10, 2026
@cstamas cstamas marked this pull request as ready for review February 10, 2026 17:48
Comment on lines 369 to 373
AuthCache cache = (AuthCache) session.getCache().get(session, authCacheKey);
if (cache == null) {
cache = new BasicAuthCache();
session.getCache().put(session, authCacheKey, cache);
}
Copy link
Member

Choose a reason for hiding this comment

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

should we synchronize such operation

@slawekjaranowski
Copy link
Member

Is it possible to do a test for it?

@cstamas
Copy link
Member Author

cstamas commented Feb 10, 2026

Is it possible to do a test for it?

That's a very good question, see #1791 (comment) and reply

Also this #1793 (comment)

@cstamas cstamas merged commit 96da9cc into apache:maven-resolver-1.9.x Feb 12, 2026
17 checks passed
@cstamas cstamas deleted the maven-resolver-1.9.x-issue-1768 branch February 12, 2026 11:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Maven 3.9.x intermittently sends unauthenticated CONNECT to proxy when using multiple artifact threads

2 participants