You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@lucene.apache.org by GitBox <gi...@apache.org> on 2020/03/18 00:17:56 UTC

[GitHub] [lucene-solr] andyvuong opened a new pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

andyvuong opened a new pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359
 
 
   Slight optimizations in ServerSideMetadata given that push operations do not require computing a directory hash of a core's index directory. This change makes the computation optional and resilient by also moving the optional computation to the latest commit capture's retry loop. 
   
   If we hit an exception (file not found, etc) either capturing files from the latest commit or during the hash computation (if captureDirHash=true), we should try and recompute both snapshots anyway.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359#discussion_r394589235
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/store/blob/metadata/ServerSideMetadata.java
 ##########
 @@ -214,23 +228,23 @@ public String getDirectoryHash() {
 
   /**
    * Returns <code>true</code> if the contents of the directory passed into this method is identical to the contents of
-   * the directory of the Solr core of this instance, taken at instance creation time.<p>
+   * the directory of the Solr core of this instance, taken at instance creation time. If the directory hash was not 
+   * computed at the instance creation time, then this returns <code>false</code>
 
 Review comment:
   If directory hash was not computed I would throw IllegalStateException instead of returning false. This will help identify the programming error faster.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] yonik merged pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
yonik merged pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359#discussion_r394705034
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/store/blob/metadata/ServerSideMetadata.java
 ##########
 @@ -212,9 +212,12 @@ public long getGeneration() {
   }
 
   /**
-   * @return Null if the directory hash was not computed for the given Core 
+   * @throw IllegalStateException is this instance was not created with a computed directoryHash 
 
 Review comment:
   typo: is=if?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359#discussion_r394707461
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/store/blob/metadata/ServerSideMetadata.java
 ##########
 @@ -229,13 +232,18 @@ public String getDirectoryHash() {
   /**
    * Returns <code>true</code> if the contents of the directory passed into this method is identical to the contents of
    * the directory of the Solr core of this instance, taken at instance creation time. If the directory hash was not 
-   * computed at the instance creation time, then this returns <code>false</code>
+   * computed at the instance creation time, then we throw an IllegalStateException indicating a programming error.
    *
    * Passing in the Directory (expected to be the directory of the same core used during construction) because it seems
    * safer than trying to get it again here...
+   * 
+   * @throw IllegalStateException is this instance was not created with a computed directoryHash 
 
 Review comment:
   typo is=if?

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359#discussion_r394591134
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/store/blob/process/CorePullTask.java
 ##########
 @@ -286,7 +286,7 @@ void pullCoreFromBlob(boolean isLeaderPulling) throws InterruptedException {
       }
 
       // Get local metadata + resolve with blob metadata. Given we're doing a pull, don't need to reserve commit point
-      ServerSideMetadata serverMetadata = new ServerSideMetadata(pullCoreInfo.getCoreName(), storeManager.getCoreContainer(), false);
+      ServerSideMetadata serverMetadata = new ServerSideMetadata(pullCoreInfo.getCoreName(), storeManager.getCoreContainer(), false, true);
 
 Review comment:
   Maybe add a short comment explaining the passed value of captureDirHash. Same comment for BlobStoreUtils.java and CorePusher.java.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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


[GitHub] [lucene-solr] mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient

Posted by GitBox <gi...@apache.org>.
mbwaheed commented on a change in pull request #1359: SOLR-13101: Make dir hash computation optional and resilient
URL: https://github.com/apache/lucene-solr/pull/1359#discussion_r394707206
 
 

 ##########
 File path: solr/core/src/java/org/apache/solr/store/blob/metadata/ServerSideMetadata.java
 ##########
 @@ -212,9 +212,12 @@ public long getGeneration() {
   }
 
   /**
-   * @return Null if the directory hash was not computed for the given Core 
+   * @throw IllegalStateException is this instance was not created with a computed directoryHash 
 
 Review comment:
   Actually I don't see this method being used any where. It'll be better to delete the method.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

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