You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by LucVL <gi...@git.apache.org> on 2015/04/08 16:24:01 UTC

[GitHub] lucene-solr pull request: LUCENE-6409 BitSetFixes

GitHub user LucVL opened a pull request:

    https://github.com/apache/lucene-solr/pull/140

    LUCENE-6409 BitSetFixes

    The pull request actually contains a few separate commits:
    - Demonstrates the bug in a simple test case and adds a patch.
    - Corrects ensureCapacity
    - Optimized bits2words for both FixedBitSet and LongBitSet


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/LucVL/lucene-solr lucene-6409-BitSetFixes

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/lucene-solr/pull/140.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #140
    
----
commit 44adaaa577839225f60a355fc3538631e0b9e965
Author: Luc Vanlerberghe <lu...@bvdinfo.com>
Date:   2014-12-12T15:48:23Z

    Demonstrate bug in LongBitSet.ensureCapacity

commit bb4257da61d45ab559ff8e3b23d9aa1d3981d366
Author: Luc Vanlerberghe <lu...@bvdinfo.com>
Date:   2014-12-12T15:53:54Z

    LongBitSet.ensureCapacity: Cast to long *before* shifting left!

commit a70e1d4b1b654e2e3655c289485af28ecdc9cd92
Author: Luc Vanlerberghe <lu...@bvdinfo.com>
Date:   2014-12-12T16:17:09Z

    Avoid an "if" in bits2words and corrected some comments

commit fd1cce82acd74a12aa4b022582985dfb8c8e4193
Author: Luc Vanlerberghe <lu...@bvdinfo.com>
Date:   2015-04-08T13:48:51Z

    Fixed grammar

commit 849dbf7a983040b50b32bd798ad191f8dd39bffb
Author: Luc Vanlerberghe <lu...@bvdinfo.com>
Date:   2015-04-08T13:49:45Z

    Merge branch 'trunk' into BitSetFixes

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr pull request: LUCENE-6409 BitSetFixes

Posted by LucVL <gi...@git.apache.org>.
Github user LucVL closed the pull request at:

    https://github.com/apache/lucene-solr/pull/140


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by hgadre <gi...@git.apache.org>.
Github user hgadre commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    @janhoy Done! Please take a look and let me know your feedback.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by hgadre <gi...@git.apache.org>.
Github user hgadre commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    @janhoy Thanks for the review. We will need to update ref guide with instructions for configuring SolrCLI against the secure SOLR cluster. e.g. with the basic auth plugin, following env variable needs to be configured,
    
    export SOLR_AUTHENTICATION_CLIENT_BUILDER="org.apache.solr.client.solrj.impl.PreemptiveBasicAuthClientBuilderFactory"
    
    We can make this nicer e.g. by adding a command-line param such as --use-basic-auth. This way the configuration of actual factory type can be hidden inside the script.
    
    With the latest changes, the pre-commit is also passing now.
    



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by hgadre <gi...@git.apache.org>.
Github user hgadre commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    @janhoy I found it difficult to add command-line parameters without extensive refactoring of scripts. Hence as an intermediate solution - I have defined an environment variable SOLR_AUTH_TYPE which can be configured with the scheme to be used (e.g. basic, kerberos etc). The script takes care of configuring the appropriate Solr HttpClientBuilderFactory. Please take a look and let me know your feedback.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by hgadre <gi...@git.apache.org>.
Github user hgadre commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    @janhoy Now that we have proper support for configuring basic auth credentials, we should also consider deprecating following logic,
    
    https://github.com/apache/lucene-solr/blob/1b80691f28b045c7a8d9552f3c63f7bafdf52d48/solr/solrj/src/java/org/apache/solr/client/solrj/SolrRequest.java#L50



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr pull request #140: [SOLR-9997] Enable configuring SolrHttpClient...

Posted by janhoy <gi...@git.apache.org>.
Github user janhoy commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/140#discussion_r96840773
  
    --- Diff: solr/solrj/src/java/org/apache/solr/client/solrj/impl/HttpClientUtil.java ---
    @@ -111,28 +112,46 @@
       // cannot be established within x ms. with a
       // java.net.SocketTimeoutException: Connection timed out
       public static final String PROP_CONNECTION_TIMEOUT = "connTimeout";
    -  
    +
    +  /**
    +   * A Java system property to select the {@linkplain HttpClientBuilderFactory} used for
    +   * configuring the {@linkplain HttpClientBuilder} instance by default.
    +   */
    +  public static final String SYS_PROP_HTTP_CLIENT_BUILDER_FACTORY = "solr.httpclient.builder.factory";
    +
       static final DefaultHttpRequestRetryHandler NO_RETRY = new DefaultHttpRequestRetryHandler(
           0, false);
     
       private static volatile SolrHttpClientBuilder httpClientBuilder;
    -  
    +
       private static SolrHttpClientContextBuilder httpClientRequestContextBuilder = new SolrHttpClientContextBuilder();
    -  
    +
    +  private static volatile SchemaRegistryProvider schemaRegistryProvider;
    +  private static volatile String cookiePolicy;
    +  private static final List<HttpRequestInterceptor> interceptors = Collections.synchronizedList(new ArrayList<HttpRequestInterceptor>());
    +
    +
       static {
         resetHttpClientBuilder();
    +
    +    // Configure the HttpClientBuilder if user has specified the factory type.
    +    String factoryClassName = System.getProperty(SYS_PROP_HTTP_CLIENT_BUILDER_FACTORY);
    +    if (factoryClassName != null) {
    +      logger.info ("Using " + factoryClassName);
    --- End diff --
    
    use logger.debug


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by hgadre <gi...@git.apache.org>.
Github user hgadre commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    @janhoy I think adding --use-basic-auth would be future proof as we add newer authentication mechanisms. We can add --use-kerberos <path_to_jaas_conf> as well for completeness. Let me take a look and update the patch accordingly.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by janhoy <gi...@git.apache.org>.
Github user janhoy commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    I like it even better :) Let's add a comment to solr.in.sh that you can **either** specify `SOLR_AUTHENTICATION_CLIENT_BUILDER` or `SOLR_AUTH_TYPE`, and perhaps give a reference to the RefGuide chapter with full docs? Should we also try to detect if both BUILDER and AUTH_TYPE is specified and bail out?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr pull request: LUCENE-6409 BitSetFixes

Posted by LucVL <gi...@git.apache.org>.
Github user LucVL commented on the pull request:

    https://github.com/apache/lucene-solr/pull/140#issuecomment-92720200
  
    Committed by Adrien Grand yesterday.
    Thanks Adrian!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[GitHub] lucene-solr issue #140: [SOLR-9997] Enable configuring SolrHttpClientBuilder...

Posted by janhoy <gi...@git.apache.org>.
Github user janhoy commented on the issue:

    https://github.com/apache/lucene-solr/pull/140
  
    I like the --use-basic-auth convenience, or should we defailt to basic if no builder is specified (like it kind of is today)?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org