Yep, seeing a refcount of 2 is OK. One of the counts comes from grabbing the core to generate the statistics... so with no other traffic, the count will be 1 before and after the statistics request, but 2 during it.
-Yonik On Tue, Jan 27, 2009 at 6:27 AM, Noble Paul നോബിള് नोब्ळ् <[email protected]> wrote: > When I look at the Solr statistics page I see the refcount as 2 .(I'm > not hitting the server) > > As aI look at the code I observe these > > private final AtomicInteger refCount = new AtomicInteger(1); > > final void open() { > refCount.incrementAndGet(); > } > > That means for any core that is open the minimum rerfcount == 2 > > and the close() is as foloows > > public void close() { > int count = refCount.decrementAndGet(); > if (count > 0) return; // close is called often, and only actually > closes if nothing is using it. > > if i closed the core once I would have the refcount as 1 and it will not > close() > > Is it true. > I have not yet tested it. > > > > > > -- > --Noble Paul >
