The original solution introduced deadlock, since it acquired the shared lock 1st, then tried to get the exclusive lock on same UID. Naturally, the "looser" deployer never released the shared lock while blocked on exclusive "deployer" lock, deadlocking the "winner" deployer too.
Reworking the 1st fix, since it was doing more than needed: it also muted events. and hence, notifications -- that relies on events stopped working. Simply put, the "transition constraint" was put in a wrong place. The event has to be sent always when setProxyMode() is invoked (see implementation, two events, one for setting always fired and one fired on transitions only).
With NEXUS-4300 implemented, UIDLocks were "put into one". Before, there was a separate lock for content and another one for attributes. As we were in the middle of moving attributes into LS, this worked, but in last moment we backed out from this. But alas, the fact that there is one -- now shared -- lock for both content and attributes got forgot about. This caused a contention, that is more visible with "bigger" files, since during a request a lastRequest attribute is updated, yielding exclusive lock against same resource, that is potentially already shared-locked by another thread that is in the middle of download. This resulted in congestions, and also in artifact serving serialization, that was not very visible with "quick" (ie. smaller) downloads, but is very visible with few hundred MB sized files. Simply put, while you download it, nobody else cannot get it, all the requests will simply remain blocked, until download finishes, and one of the waiting ones will be the next one able to download. Related changes: 6d0475e 83975d5
…maintenance. This solution enables you to turn off this feature altogether, but also to enable it selectively only for hosted or proxy repositories if needed. Example: nexus.ls.file.touchLastRequested=false nexus.ls.file.touchLastRequested.proxy=true would enable lastRequested maintenance only for proxy repositories, to be able to use the purge task. Groups, shadows, hosted repososes would NOT maintain those.
* Do not purge NFC when we have automatic transition of ProxyMode (BLOCKED_AUTO -> ALLOW), only when it't about user intervention (BLOCKED_MANUAL -> ALLOW) * Do not autoBlock proxy repository before checking it's current ProxyMode, it's maybe already blocked manually by user!
… branch commit for NEXUS-4315 add proxy config support to restlight client SHA 5cbc59c
This reverts commit 4bb84c0.
This reverts commit a0886b8.
This reverts commit 20c7b91.
This reverts commit d34e72c.
…e. The JSecurity filter code is tricky, that made me believe we do save them, but it turned out it's not the case. UT extended to test both cases.
Fixed by Jesse's workaround described on issue http://jira.codehaus.org/browse/MINDEXER-34 In short, not relying on List injection (by SISU) where order of components in list are not guaranteed, but instead, manually looking them up and creating a list to pass at IndexContext creation. After bumping to Maven Indexer 4.1.2 this workaround will be not needed, but will not stir anything.
…le problems: * was not properly filtering "similar" events, causing huge timeline growth by recording every authc event * was not marked as Async, and due to reason above, potentially resulted in slowing down all requests
…code was comitted.
… benchmarking together with the fixes. Only AddVersionOperation fixed for now, AddPluginOperation is not touched (just filled with comments). Will tackle together with NEXUS-4448 since it would need more work.