You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by "Natarajan, Rajeswari" <ra...@sap.com> on 2019/07/25 18:01:57 UTC

Re: [CAUTION] Re: [CAUTION] Re: CDCR Queues API invocation with CloudSolrclient

I tried Shawn's suggestion to use SolrQuery Object instead of  QT , still it is the same issue.

Regards,
Rajeswari

On 7/24/19, 4:54 PM, "Natarajan, Rajeswari" <ra...@sap.com> wrote:

    Please look at the below test  which tests CDCR OPS Api. This has "BadApple" annotation (meaning the test fails intermittently)
    https://github.com/apache/lucene-solr/blob/master/solr/core/src/test/org/apache/solr/cloud/cdcr/CdcrOpsAndBoundariesTest.java#L73
    This also  is because of  sometimes the Cloudsolrclient gets the value and sometimes not. This OPS api also needs to talk to core. OK indeed this issue looks like a bug
    
    Thanks,
    Rajeswari
    
    On 7/24/19, 4:18 PM, "Natarajan, Rajeswari" <ra...@sap.com> wrote:
    
        Btw , the code is copied from solr 7.6 source code.
        
        Thanks,
        Rajeswari
        
        On 7/24/19, 4:12 PM, "Natarajan, Rajeswari" <ra...@sap.com> wrote:
        
            Thanks Shawn for the reply. I am not saying it is bug. I just would like to know how to get the "lastTimestamp" by invoking CluodSolrClient reliabily.
            
            Regards,
            Rajeswari
            
            On 7/24/19, 3:14 PM, "Shawn Heisey" <ap...@elyograg.org> wrote:
            
                On 7/24/2019 3:50 PM, Natarajan, Rajeswari wrote:
                > Hi,
                > 
                > With the below API , the QueryResponse , sometimes have the "lastTimestamp" , sometimes not.
                > protected static QueryResponse getCdcrQueue(CloudSolrClient client) throws SolrServerException, IOException {
                >      ModifiableSolrParams params = new ModifiableSolrParams();
                >      params.set(CommonParams.QT, "/cdcr");
                >      params.set(CommonParams.ACTION, CdcrParams.QUEUES);
                >      return client.query(params);
                >    }
                
                Side note:  Setting the handler path with the qt parameter was 
                deprecated in Solr 3.6, which was released seven years ago.  I'm 
                surprised it even still works.
                
                Use a SolrQuery object instead of ModifiableSolrParams, and call its 
                setRequestHandler method to set the request handler.
                
                > Invoking http://<hostname>:<port>/solr/<collectionName>/cdcr?action=QUEUES  has the same issue
                > 
                > But if invoked as http://<hostname>:<port>/solr/<coreName>/cdcr?action=QUEUES always gets the " lastTimestamp" value. Would like to know
                > How to get the cdcr queues always return " lastTimestamp" value reliabily by CloudSolrClient.
                
                This part I really have no idea about.  The API documentation does say 
                that monitoring actions are done at the core level and control actions 
                are done at the collection level, so this might not be considered a bug. 
                  Someone who knows CDCR really well will need to comment.
                
                https://lucene.apache.org/solr/guide/8_1/cdcr-api.html
                
                Thanks,
                Shawn