[ https://issues.apache.org/jira/browse/SOLR-10968?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16067065#comment-16067065 ]
Varun Thacker commented on SOLR-10968: -------------------------------------- Hi Rohit, Patch looks good! Few comments - The general convention is to upload a patch with SOLR-10968.patch and not 10968.patch - It seems like the patch also contains changes for SOLR-10969 . Can you please remove the changes from the patch here so that we can tackle it differently? - In SolrCloud if you call a commit against a core ( 1 replica ) of a collection it gets forwarded to all the replicas. Example: {code} > ./bin/solr start -e cloud -noprompt > Issue a commit against one core: > http://localhost:8983/solr/gettingstarted_shard1_replica1/update?commit=true >From node1: INFO - 2017-06-28 19:09:46.419; [c:gettingstarted s:shard2 r:core_node1 x:gettingstarted_shard2_replica1] org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor; [gettingstarted_shard2_replica1] webapp=/solr path=/update params={update.distrib=FROMLEADER&update.chain=add-unknown-fields-to-the-schema&waitSearcher=true&openSearcher=true&commit=true&softCommit=false&distrib.from=http://192.168.0.3:8983/solr/gettingstarted_shard1_replica1/&commit_end_point=true&wt=javabin&version=2&expungeDeletes=false}{commit=} 0 3 INFO - 2017-06-28 19:09:46.419; [c:gettingstarted s:shard1 r:core_node2 x:gettingstarted_shard1_replica1] org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor; [gettingstarted_shard1_replica1] webapp=/solr path=/update params={update.distrib=FROMLEADER&update.chain=add-unknown-fields-to-the-schema&waitSearcher=true&openSearcher=true&commit=true&softCommit=false&distrib.from=http://192.168.0.3:8983/solr/gettingstarted_shard1_replica1/&commit_end_point=true&wt=javabin&version=2&expungeDeletes=false}{commit=} 0 3 INFO - 2017-06-28 19:09:46.432; [c:gettingstarted s:shard1 r:core_node2 x:gettingstarted_shard1_replica1] org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor; [gettingstarted_shard1_replica1] webapp=/solr path=/update params={commit=true}{commit=} 0 34 >From node2 logs: INFO - 2017-06-28 19:09:46.429; [c:gettingstarted s:shard2 r:core_node3 x:gettingstarted_shard2_replica2] org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor; [gettingstarted_shard2_replica2] webapp=/solr path=/update params={update.distrib=FROMLEADER&update.chain=add-unknown-fields-to-the-schema&waitSearcher=true&openSearcher=true&commit=true&softCommit=false&distrib.from=http://192.168.0.3:8983/solr/gettingstarted_shard1_replica1/&commit_end_point=true&wt=javabin&version=2&expungeDeletes=false}{commit=} 0 13 INFO - 2017-06-28 19:09:46.429; [c:gettingstarted s:shard1 r:core_node4 x:gettingstarted_shard1_replica2] org.apache.solr.update.processor.LogUpdateProcessorFactory$LogUpdateProcessor; [gettingstarted_shard1_replica2] webapp=/solr path=/update params={update.distrib=FROMLEADER&update.chain=add-unknown-fields-to-the-schema&waitSearcher=true&openSearcher=true&commit=true&softCommit=false&distrib.from=http://192.168.0.3:8983/solr/gettingstarted_shard1_replica1/&commit_end_point=true&wt=javabin&version=2&expungeDeletes=false}{commit=} 0 12 {code} > Collection Backup API call fails with exception > ----------------------------------------------- > > Key: SOLR-10968 > URL: https://issues.apache.org/jira/browse/SOLR-10968 > Project: Solr > Issue Type: Bug > Security Level: Public(Default Security Level. Issues are Public) > Components: Backup/Restore > Affects Versions: 6.1, 6.2, 6.3, 6.4, 6.5, 6.6 > Environment: Tested on Fedora 24 64-bit (Linux), 8 GB RAM, 2 CPU and > OS: Mac OSX Sierra > Processor: 2.6 GHz Intel Core i5 (64 bit) > RAM: 8 GB > Reporter: Rohit > Assignee: Varun Thacker > Priority: Minor > Labels: Backup, Solr_Cloud > Attachments: 10968.patch > > > Backup API > (https://cwiki.apache.org/confluence/display/solr/Collections+API#CollectionsAPI-backup) > fails with exception: > "org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: > Could not backup all replicas" > Steps to reproduce the issue > Solr 6.6.0 (fresh install, 4 node solr cluster): > 1. Create a collection in Solr called citibike: > {color:#14892c}http://localhost:8983/solr/admin/collections?action=CREATE&name=citibike&numShards=2&replicationFactor=1&maxShardsPerNode=1&collection.configName=rohit&&createNodeSet=192.168.3.15:7574_solr,192.168.3.15:8983_solr{color} > 2. Index 8 documents to Solr collection citibike: > { > "responseHeader":{ > "zkConnected":true, > "status":0, > "QTime":10, > "params":{ > "q":"*:*", > "indent":"on", > "wt":"json"}}, > > {color:#14892c}"response":{"numFound":8,"start":0,"maxScore":1.0,"docs":[{color} > { > "id":"doc1", > "_version_":1570643322182041600}, > { > "id":"doc2", > "_version_":1570643322185187328}, > { > "id":"doc3", > "_version_":1570643322185187329}, > { > "id":"doc5", > "_version_":1570643322188333056}, > { > "id":"doc6", > "_version_":1570643322191478784}, > { > "id":"doc7", > "_version_":1570643322191478785}, > { > "id":"doc8", > "_version_":1570643322191478786}, > { > "id":"doc4", > "_version_":1570643322179944448}] > }} > 2. Try to create a backup of the collection with only 8 documents: > { > "responseHeader":{ > "status":500, > "QTime":20}, > {color:#14892c} "failure":{ > > "192.168.3.15:8983_solr":"org.apache.solr.client.solrj.impl.HttpSolrClient$RemoteSolrException:Error > from server at http://192.168.3.15:8983/solr: Failed to backup > core=citibike_shard2_replica1 because java.nio.file.NoSuchFileException: > /Users/Rohit/Documents/SolrInstall/solr-6.6.0/example/cloud/node1/solr/citibike_shard2_replica1/data/index/segments_8"}, > "Operation backup caused > exception:":"org.apache.solr.common.SolrException:org.apache.solr.common.SolrException: > Could not backup all replicas", > "exception":{ > "msg":"Could not backup all replicas", > "rspCode":500}, > "error":{ > "metadata":[ > "error-class","org.apache.solr.common.SolrException", > "root-error-class","org.apache.solr.common.SolrException"], > "msg":"Could not backup all replicas", > "trace":"org.apache.solr.common.SolrException: Could not backup all > replicas\n\tat > org.apache.solr.handler.admin.CollectionsHandler.handleResponse(CollectionsHandler.java:300)\n\tat > > org.apache.solr.handler.admin.CollectionsHandler.invokeAction(CollectionsHandler.java:237)\n\tat > > org.apache.solr.handler.admin.CollectionsHandler.handleRequestBody(CollectionsHandler.java:215)\n\tat > > org.apache.solr.handler.RequestHandlerBase.handleRequest(RequestHandlerBase.java:173)\n\tat > > org.apache.solr.servlet.HttpSolrCall.handleAdmin(HttpSolrCall.java:748)\n\tat > org.apache.solr.servlet.HttpSolrCall.handleAdminRequest(HttpSolrCall.java:729)\n\tat > org.apache.solr.servlet.HttpSolrCall.call(HttpSolrCall.java:510)\n\tat > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:361)\n\tat > > org.apache.solr.servlet.SolrDispatchFilter.doFilter(SolrDispatchFilter.java:305)\n\tat > > org.eclipse.jetty.servlet.ServletHandler$CachedChain.doFilter(ServletHandler.java:1691)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:582)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:143)\n\tat > > org.eclipse.jetty.security.SecurityHandler.handle(SecurityHandler.java:548)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doHandle(SessionHandler.java:226)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1180)\n\tat > > org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:512)\n\tat > > org.eclipse.jetty.server.session.SessionHandler.doScope(SessionHandler.java:185)\n\tat > > org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1112)\n\tat > > org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)\n\tat > > org.eclipse.jetty.server.handler.ContextHandlerCollection.handle(ContextHandlerCollection.java:213)\n\tat > > org.eclipse.jetty.server.handler.HandlerCollection.handle(HandlerCollection.java:119)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat > > org.eclipse.jetty.rewrite.handler.RewriteHandler.handle(RewriteHandler.java:335)\n\tat > > org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:134)\n\tat > org.eclipse.jetty.server.Server.handle(Server.java:534)\n\tat > org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:320)\n\tat > org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:251)\n\tat > > org.eclipse.jetty.io.AbstractConnection$ReadCallback.succeeded(AbstractConnection.java:273)\n\tat > org.eclipse.jetty.io.FillInterest.fillable(FillInterest.java:95)\n\tat > org.eclipse.jetty.io.SelectChannelEndPoint$2.run(SelectChannelEndPoint.java:93)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.executeProduceConsume(ExecuteProduceConsume.java:303)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.produceConsume(ExecuteProduceConsume.java:148)\n\tat > > org.eclipse.jetty.util.thread.strategy.ExecuteProduceConsume.run(ExecuteProduceConsume.java:136)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:671)\n\tat > > org.eclipse.jetty.util.thread.QueuedThreadPool$2.run(QueuedThreadPool.java:589)\n\tat > java.lang.Thread.run(Thread.java:745)\n", > "code":500}}{color} > *Suggested Fix: * _{color:#205081}Call commit on the collection and try to > execute the Backup API again. This time it works as the segments have been > written to disk. > So fix would be to call commit for the collection intrinsically every time > BACKUP API is invoked. {color}_ -- This message was sent by Atlassian JIRA (v6.4.14#64029) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org For additional commands, e-mail: dev-h...@lucene.apache.org