Hi again! I'm diving inside DirectUpdateHandler2 code and it seems that the problem is that when a commit, when core.openNewSercher(true,true) is called it returns a RefCounted<SolrIndexSearcher> with a new searcher reference that points to an old (probably cached somehow) data dir. I've tried with core.openNewSearcher(false, false) but it doesn't work. What I think that I need is simple: after a commit, SolrIndexSearcher must be reload with a recent index snapshot not using any NRT caching method or whatever.
(...) synchronized (solrCoreState.getUpdateLock()) { if (ulog != null) ulog.preSoftCommit(cmd); if (cmd.openSearcher) { core.getSearcher(true, false, waitSearcher); } else { // force open a new realtime searcher so realtime-get and versioning code can see the latest * RefCounted<SolrIndexSearcher> searchHolder = core.openNewSearcher(true, true); * searchHolder.decref(); } if (ulog != null) ulog.postSoftCommit(cmd); } It seems that executing this a new SolrIndexSearcher is returned, but I don't know how to set that new SolrIndexSearcher to the SolrCore instance: * SolrIndexSearcher searcher = core.newSearcher("Last update searcher");* Does anybody knows if possible? Thanks in advance! Best, 2014-03-12 12:10 GMT+01:00 Luis Cappa Banda <luisca...@gmail.com>: > I've seen that StandardDirectoryReader appears in the commit logs. Maybe > this DirectoryReader type is caching somehow the old segments in SolrB and > SolrC even if they have been commited previosly. If that's true, does exist > any other DirectoyReader type (I don't know, SimpleDirectoryReader or > FSDirectoyReader) that always read the current segments when a commit > happens? > > > 2014-03-12 11:35 GMT+01:00 Luis Cappa Banda <luisca...@gmail.com>: > > Hey guys, >> >> I've doing some tests sharing the same index between three Solr servers: >> >> *SolrA*: is allowed to both read and index. The index is stored in a >> NFS. It has its own configuration files. >> *SolrB and SolrC*: they can only read from the shared index and each one >> has their own configuration files. Solrconfig.xml has been changed with the >> following parameters: >> >> <lockType>single</lockType> >> >> >> When all servers startup they all work perfectly executing search >> operations. The problem appears when SolrA index new documents (commiting >> itself afther that indexation operation). If I manually execute a commit or >> a softCommit to SolrB or SolrC, they are not able to see the new documents >> added even if it is suposed to reopen a new searcher when a commit occurs. >> >> I have noticed that a commit operation in SolrA shows different segments >> (the newest ones) compared with the logs that SorlB/SolrC has after a >> commit. In other words, SolrA shows newer segments and SolrB/SolrC appears >> to see just the old ones. >> >> Is that normal? Any idea or suggestion to solve this? >> >> Thank you in advance, :-) >> >> Best regards, >> >> -- >> - Luis Cappa >> > > > > -- > - Luis Cappa > -- - Luis Cappa