Skip to content

Locking inhibitor SPI#1696

Merged
cstamas merged 6 commits intoapache:masterfrom
cstamas:locking-inhibitor-spi
Dec 1, 2025
Merged

Locking inhibitor SPI#1696
cstamas merged 6 commits intoapache:masterfrom
cstamas:locking-inhibitor-spi

Conversation

@cstamas
Copy link
Member

@cstamas cstamas commented Nov 28, 2025

A new SPI that offers ability to augment Resolver locking and inhibit locking on certain resources.

Out of the box RRF prefix file inhibition is provided.

Fixes #1663
Fixes #1641

A new SPI that offers ability to augment Resolver locking and
inhibit locking on certain resources.

Out of the box RRF prefix file inhibition is provided.

Fixes apache#1663
Fixes apache#1641
@cstamas cstamas added this to the 2.0.14 milestone Nov 28, 2025
@cstamas cstamas self-assigned this Nov 28, 2025
@cstamas cstamas added the enhancement New feature or request label Nov 28, 2025
@cstamas cstamas marked this pull request as ready for review November 28, 2025 17:43
* May provide a predicate for artifacts that needs lock inhibition. <em>Warning: you do not want to override
* this method, or if you do, think twice.</em>
*/
default Optional<Predicate<Artifact>> inhibitArtifactLocking() {
Copy link
Contributor

Choose a reason for hiding this comment

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

That looks over engineered.
Why not a simple

    default boolean inhibitLock(Artifact artifact) {
        return false;
    }

    default boolean inhibitLock(Metadata metadata) {
        return false;
    }

Copy link
Contributor

Choose a reason for hiding this comment

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

or preventLock... ?

Copy link
Member Author

Choose a reason for hiding this comment

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

Simplified

@cstamas cstamas requested a review from gnodet December 1, 2025 15:27
@cstamas cstamas merged commit a4058a8 into apache:master Dec 1, 2025
13 of 14 checks passed
@cstamas cstamas deleted the locking-inhibitor-spi branch December 1, 2025 16:33
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Prefix file discovery locking conflicts Lock congestion on metadata (ie prefix files)

2 participants