cstamas commented on pull request #77:
URL: https://github.com/apache/maven-resolver/pull/77#issuecomment-811824284


   > A left a few comments, please go through.
   > 
   > * I have a few more homework to do because I do not fully understand all 
involved layers with `AdaptedReadWriteLockNamedLock` and 
`NamedLockFactorySupport`. I am bit worried that (Redisson) lock objects will 
be cached in memory although it is absolutely not always necessary because the 
Redission client will retrieve them anyway from the Redis instance when a lock 
operation is performed.
   > * What is gone is the map with key lock and value integer. It has been 
replaced with a deque. From a technical point of view it is fine because it 
will retain reverse order lock release to avoid deadlocks. Though,  I 
intentionally have created the map because I wanted to print the reentrant lock 
count for debugging/analysis purposes.
   > * After I will have established better understanding I will run tests.
   > * What I do not understand is why bind name mappers and factories, but 
still assemble them manually instead of having a map injects with a 
provider/map with name key and object value?! Isn't this duplicate work/brittle?
   
   * Yes, they will be cached, for as long as the lock is in use. As we 
implement reference counting, they will be removed once the last lock using 
thread releases it.
   * we can add some debugging/analysis helpers around, if needed, but IMHO we 
did not lost too much here. What specifics you have on mind?
   * OK
   * :smile: ServiceLocator: as long it is present, we need these "loops and 
hoops", make objects work with default ctor, "constant-looking params" and 
other trickeries... once ServiceLocator is gone, and only DI (SISU more 
specifically) is used, these things will get explicit and much more cleaner.
   
   Waiting for response.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to