You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by andyetitmoves <gi...@git.apache.org> on 2014/07/26 11:10:10 UTC

[GitHub] lucene-solr pull request: Fix NPE in OCP when non-existent sliceId...

GitHub user andyetitmoves opened a pull request:

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

    Fix NPE in OCP when non-existent sliceId is used for a deleteShard request

    Patch for SOLR-6284

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

    $ git pull https://github.com/bloomberg/lucene-solr trunk-del-shard-npe

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

    https://github.com/apache/lucene-solr/pull/74.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 #74
    
----
commit cf7fc56e0e22e49d7d126c6fc7ca3864dfc1831d
Author: Ramkumar Aiyengar <an...@gmail.com>
Date:   2014-07-26T09:06:10Z

    Fix NPE when non-existent sliceId is used for a deleteShard request

----


---
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: Fix NPE in OCP when non-existent sliceId...

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

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


---
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 #74: [SOLR-9444] Fix path usage for cloud backup/re...

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

    https://github.com/apache/lucene-solr/pull/74#discussion_r77301896
  
    --- Diff: solr/core/src/test/org/apache/solr/cloud/TestLocalFSCloudBackupRestore.java ---
    @@ -24,12 +24,20 @@
      * such file-system would be exposed via local file-system API.
      */
     public class TestLocalFSCloudBackupRestore extends AbstractCloudBackupRestoreTestCase {
    +  private static String backupLocation;
     
       @BeforeClass
       public static void setupClass() throws Exception {
         configureCluster(NUM_SHARDS)// nodes
             .addConfig("conf1", TEST_PATH().resolve("configsets").resolve("cloud-minimal").resolve("conf"))
             .configure();
    +
    +    boolean whitespacesInPath = random().nextBoolean();
    +    if (whitespacesInPath) {
    +      backupLocation = createTempDir("my backup").toFile().getAbsolutePath();
    --- End diff --
    
    I'd use `backupLocation = createTempDir(...).toAbsolutePath().toString();` to get rid of legacy `java.io.File`


---
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 #74: [SOLR-9444] Fix path usage for cloud backup/re...

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

    https://github.com/apache/lucene-solr/pull/74#discussion_r76740913
  
    --- Diff: solr/core/src/java/org/apache/solr/core/backup/repository/LocalFileSystemRepository.java ---
    @@ -58,21 +59,28 @@ public void init(NamedList args) {
       }
     
       @Override
    -  public URI createURI(String... pathComponents) {
    -    Preconditions.checkArgument(pathComponents.length > 0);
    -
    -    String basePath = Preconditions.checkNotNull(pathComponents[0]);
    -    // Note the URI.getPath() invocation on Windows platform generates an invalid URI.
    -    // Refer to http://stackoverflow.com/questions/9834776/java-nio-file-path-issue
    -    // Since the caller may have used this method to generate the string representation
    -    // for the pathComponents, we implement a work-around specifically for Windows platform
    -    // to remove the leading '/' character.
    -    if (Constants.WINDOWS) {
    -      basePath = basePath.replaceFirst("^/(.:/)", "$1");
    +  public URI createURI(String location) {
    +    Preconditions.checkNotNull(location);
    +
    +    URI result = null;
    +    try {
    --- End diff --
    
    Nice. This is exactly as I proposed. So people can use both URIs with a file: or just a plain path. URI.isAbsolute() returns false, if scheme ("file:") is missing: <https://docs.oracle.com/javase/7/docs/api/java/net/URI.html#isAbsolute()> "A URI is absolute if, and only if, it has a scheme component."


---
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 #74: [SOLR-9444] Fix path usage for cloud backup/re...

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

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


---
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