Hi,

I'm trying to get CDCR to run, but I can't even trigger any communication between SOURCE and TARGET. It seems to be a small but grave misunderstanding. I've tested a lot of variants but now I'm blind on this point.
If anyone could give me a hint, I would appreciate.

Uwe


Testsetting:
Two nearly identical hosts (open solaris) with:
- a minimal zookeeper ensemble (one local installation (not embedded), listening on port 2181)
- a minimal cloud (one node, one empty collection, 4 shards)
Initial both installations differ only in solrconfig.xml (snipplets below)
The tcp traffic was observed with 'snoop' (tcpdump). There are no packet filters or other firewalls between both machines.


Testprocess:

1. Start node for TARGET

2. Create TARGET collection 'tcoll'
http://TARGET:t_port/solr/admin/collections?action=CREATE&name=tcoll&numShards=4&replicationFactor=1&maxShardsPerNode=4&collection.configName=cdcr

3. Get status
http://TARGET:t_port/solr/tcoll/cdcr?action=status&wt=json
{"responseHeader":{"status":0,"QTime":0},"status":["process","stopped","buffer","enabled"]}

4. Disable buffer
http://TARGET:t_port/solr/tcoll/cdcr?action=disablebuffer&wt=json
{"responseHeader":{"status":0,"QTime":12},"status":["process","stopped","buffer","disabled"]}

6. Start node for SOURCE
(like expected, no tcp between both hosts)

7. Create SOURCE collection 'scoll'
http://SOURCE:s_port/solr/admin/collections?action=CREATE&name=scoll&numShards=4&replicationFactor=1&maxShardsPerNode=4&collection.configName=cdcr
(no tcp between both hosts)

8. Get status
http://SOURCE:s_port/solr/scoll/cdcr?action=status&wt=json
{"responseHeader":{"status":0,"QTime":13},"status":["process","stopped","buffer","enabled"]}
(like expected, no tcp between both hosts)

9. Start CDCR
http://SOURCE:s_port/solr/scoll/cdcr?action=start&wt=json
{"responseHeader":{"status":0,"QTime":13},"status":["process","started","buffer","enabled"]}
! (not even a single query to the target's zookeeper ??)

10. Enter some test data into the SOURCE

11. Explicit commit in SOURCE
http://SOURCE:s_port/solr/scoll/update?commit=true&opensearcher=true
!! (at least now there should be some traffic, or?)

12. Check errors and queues
http://SOURCE:s_port/solr/scoll_shard1_replica1/cdcr?action=queues&wt=json
{"responseHeader":{"status":0,"QTime":0},"queues":[],"tlogTotalSize":135,"tlogTotalCount":1,"updateLogSynchronizer":"stopped"}
http://SOURCE:s_port/solr/scoll_shard1_replica1/cdcr?action=errors&wt=json
{"responseHeader":{"status":0,"QTime":0},"errors":[]}
! Why is the element queues is empty


???? where is my stupid bug ????




####################
# solrconfig Source
####################
<updateHandler class="solr.DirectUpdateHandler2">
   <updateLog class="solr.CdcrUpdateLog">
       <str name="dir">${solr.ulog.dir:}</str>
   </updateLog>
</updateHandler>

<requestHandler name="/cdcr" class="solr.CdcrRequestHandler">
  <lst name="replica">
     <str name="zkHost">TARGET:2181</str>
     <str name="Source">scoll</str>
     <str name="Target">tcoll</str>
  </lst>
  <lst name="replicator">
     <str name="batchSize">1</str> <!-- only for testing -->
  </lst>
</requestHandler>

####################
# solrconfig Target
####################
<updateHandler class="solr.DirectUpdateHandler2">
   <updateLog class="solr.CdcrUpdateLog">
       <str name="dir">${solr.ulog.dir:}</str>
   </updateLog>
   <autoCommit>
       <maxDocs>${solr.autoCommit.maxdocs:1000}</maxDocs>
       <maxTime>${solr.autoCommit.maxTime:300}</maxTime>
       <openSearcher>true</openSearcher>
   </autoCommit>
   <autoSoftCommit>
       <maxTime>${solr.autoSoftCommit.maxTime:60}</maxTime>
   </autoSoftCommit>
</updateHandler>

<requestHandler name="/cdcr" class="solr.CdcrRequestHandler">
   <lst name="buffer">
      <str name="defaultState">disabled</str>
   </lst> <!-- why is this default ignored? -->
</requestHandler>

<requestHandler name="/update" class="solr.UpdateRequestHandler">
   <lst name="defaults">
      <str name="update.chain">cdcr-processor-chain</str>
   </lst>
</requestHandler>

<updateRequestProcessorChain name="cdcr-processor-chain">
   <processor class="solr.CdcrUpdateProcessorFactory"/>
   <processor class="solr.RunUpdateProcessorFactory"/>
</updateRequestProcessorChain>

######################################
# EOF
#####

Reply via email to