You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@solr.apache.org by Karl Stoney <Ka...@autotrader.co.uk.INVALID> on 2021/04/02 17:05:07 UTC

Replicate the behaviour of linkconfig via apis

Hi all,
I’m trying to move away from using `zkcli` and using more first-class APIs like the configset one.
However I am unsure how to replicate the `linkconfig` command, eg: /solr/script/zkcli.sh -cmd linkconfig -collection $COLLECTION_NAME -confname $NEW_CONFIG_NAME -zkhost ${ZK_HOST}

Would it just be a MODIFYCOLLECTION setting collection.configName?

Thanks
Unless expressly stated otherwise in this email, this e-mail is sent on behalf of Auto Trader Limited Registered Office: 1 Tony Wilson Place, Manchester, Lancashire, M15 4FN (Registered in England No. 03909628). Auto Trader Limited is part of the Auto Trader Group Plc group. This email and any files transmitted with it are confidential and may be legally privileged, and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This email message has been swept for the presence of computer viruses.

Re: Replicate the behaviour of linkconfig via apis

Posted by Karl Stoney <Ka...@autotrader.co.uk.INVALID>.
Appears to be a bug as the same request without async works fine; raised at https://issues.apache.org/jira/browse/SOLR-15311

On 03/04/2021, 12:36, "Karl Stoney" <Ka...@autotrader.co.uk> wrote:

    Further to this I decided to experiment and did a MODIFYCOLLECTION, I get the following error in the solr logs:

    11:34:01.057 [OverseerThreadFactory-20-thread-5-processing-n:solr-0.search-solr.svc.cluster.local:80_solr] ERROR org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler - Collection: at-uk-004 operation: modifycollection failed:org.apache.solr.common.SolrException: Could not modify collection {
      "collection":"at-uk-004",
      "async":"1617449610",
      "operation":"modifycollection"}
            at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.modifyCollection(OverseerCollectionMessageHandler.java:669)
            at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:266)
            at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:524)
            at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:218)
            at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
            at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
            at java.base/java.lang.Thread.run(Thread.java:834)

    However if I look in the solr interface, the collection has been updated to the new config so _seems_ OK?



    On 02/04/2021, 18:05, "Karl Stoney" <Ka...@autotrader.co.uk.INVALID> wrote:

        Hi all,
        I’m trying to move away from using `zkcli` and using more first-class APIs like the configset one.
        However I am unsure how to replicate the `linkconfig` command, eg: /solr/script/zkcli.sh -cmd linkconfig -collection $COLLECTION_NAME -confname $NEW_CONFIG_NAME -zkhost ${ZK_HOST}

        Would it just be a MODIFYCOLLECTION setting collection.configName?

        Thanks
        Unless expressly stated otherwise in this email, this e-mail is sent on behalf of Auto Trader Limited Registered Office: 1 Tony Wilson Place, Manchester, Lancashire, M15 4FN (Registered in England No. 03909628). Auto Trader Limited is part of the Auto Trader Group Plc group. This email and any files transmitted with it are confidential and may be legally privileged, and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This email message has been swept for the presence of computer viruses.


Unless expressly stated otherwise in this email, this e-mail is sent on behalf of Auto Trader Limited Registered Office: 1 Tony Wilson Place, Manchester, Lancashire, M15 4FN (Registered in England No. 03909628). Auto Trader Limited is part of the Auto Trader Group Plc group. This email and any files transmitted with it are confidential and may be legally privileged, and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This email message has been swept for the presence of computer viruses.

Re: Replicate the behaviour of linkconfig via apis

Posted by Karl Stoney <Ka...@autotrader.co.uk.INVALID>.
Further to this I decided to experiment and did a MODIFYCOLLECTION, I get the following error in the solr logs:

11:34:01.057 [OverseerThreadFactory-20-thread-5-processing-n:solr-0.search-solr.svc.cluster.local:80_solr] ERROR org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler - Collection: at-uk-004 operation: modifycollection failed:org.apache.solr.common.SolrException: Could not modify collection {
  "collection":"at-uk-004",
  "async":"1617449610",
  "operation":"modifycollection"}
        at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.modifyCollection(OverseerCollectionMessageHandler.java:669)
        at org.apache.solr.cloud.api.collections.OverseerCollectionMessageHandler.processMessage(OverseerCollectionMessageHandler.java:266)
        at org.apache.solr.cloud.OverseerTaskProcessor$Runner.run(OverseerTaskProcessor.java:524)
        at org.apache.solr.common.util.ExecutorUtil$MDCAwareThreadPoolExecutor.lambda$execute$0(ExecutorUtil.java:218)
        at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
        at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
        at java.base/java.lang.Thread.run(Thread.java:834)

However if I look in the solr interface, the collection has been updated to the new config so _seems_ OK?



On 02/04/2021, 18:05, "Karl Stoney" <Ka...@autotrader.co.uk.INVALID> wrote:

    Hi all,
    I’m trying to move away from using `zkcli` and using more first-class APIs like the configset one.
    However I am unsure how to replicate the `linkconfig` command, eg: /solr/script/zkcli.sh -cmd linkconfig -collection $COLLECTION_NAME -confname $NEW_CONFIG_NAME -zkhost ${ZK_HOST}

    Would it just be a MODIFYCOLLECTION setting collection.configName?

    Thanks
    Unless expressly stated otherwise in this email, this e-mail is sent on behalf of Auto Trader Limited Registered Office: 1 Tony Wilson Place, Manchester, Lancashire, M15 4FN (Registered in England No. 03909628). Auto Trader Limited is part of the Auto Trader Group Plc group. This email and any files transmitted with it are confidential and may be legally privileged, and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This email message has been swept for the presence of computer viruses.

Unless expressly stated otherwise in this email, this e-mail is sent on behalf of Auto Trader Limited Registered Office: 1 Tony Wilson Place, Manchester, Lancashire, M15 4FN (Registered in England No. 03909628). Auto Trader Limited is part of the Auto Trader Group Plc group. This email and any files transmitted with it are confidential and may be legally privileged, and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the sender. This email message has been swept for the presence of computer viruses.