yhs0092 commented on pull request #1936:
URL: 
https://github.com/apache/servicecomb-java-chassis/pull/1936#issuecomment-685256071


   I've also considered about other solutions.
   An alternative choice is to use `SoftReference` to hold the `Invocation` 
instance in `TryingIsolatedServerMarker`. In case that the 
`Invocation#finished` is not set to true properly, the trying chance can be 
released when the `SoftReference` returns `null` (which means the `Invocation` 
instance is garbage collected --- the invocation is over).
   The advantage of this solution is the new config item 
`servicecomb.loadbalance.isolation.maxSingleTestWindow` is not needed. While 
there is also the disadvantage. Since the result of `SoftReference#get` gets 
null after the garbage collection happens, this insurance policy depends on the 
timing of GC. The result seems uncontrollable.


----------------------------------------------------------------
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