SAI-4635 : Log refCount and core name if refCount of SolrCore is > 1 after SolrDispatchFilter finishes processing #145
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
This is a follow-up on https://fullstory.atlassian.net/browse/SAI-4635 investigation which the source core failed to unload after a solrman move.
This is triggered by the
RefCount
of theSolrCore
got stuck at > 1, hence preventing the unload. By code inspection, we could not find any trivial cause of such a "leak". However, this could also be caused by hanging core specific calls that holds such ref.Solution
We currently only know such
RefCount
issue when we attempt to unload such core, hence it's hard to track when did that start happening.Therefore we are adding some simple logging when upon SolrDispatcherFilter completion, the
refCount
still gets stuck at > 1. Take note that some occurrences of that does not necessarily indicate an issue (a long running query CAN hold such refcount for a while etc), however when unload failures happen, we can then at least track back WHEN did we started having a continuously elevated ref count and hopefully find out the actual cause of such issue from the log.Additionally, we have considered just printing the same debug info on each core specific request start. However, this could be a bit too noisy for such an issue with rare occurrence. (twice in last few months https://fullstory.atlassian.net/browse/SAI-4635 and https://fullstory.atlassian.net/browse/SAI-4454