GrantPSpencer commented on code in PR #2873:
URL: https://github.com/apache/helix/pull/2873#discussion_r1715794134


##########
helix-core/src/main/java/org/apache/helix/manager/zk/ZkBucketDataAccessor.java:
##########
@@ -429,4 +427,14 @@ private List<String> getPathsToDelete(String path, 
List<String> staleVersions) {
     staleVersions.forEach(ver -> pathsToDelete.add(path + "/" + ver));
     return pathsToDelete;
   }
+
+  private String getLastSuccessfulWriteVersion(String path) {
+    byte[] binaryVersionToRead = _zkBaseDataAccessor.get(path + "/" + 
LAST_SUCCESSFUL_WRITE_KEY,
+        null, AccessOption.PERSISTENT);
+    if (binaryVersionToRead == null) {
+      throw new ZkNoNodeException(
+          String.format("Last successful write ZNode does not exist for path: 
%s", path));

Review Comment:
   I believe this try block should catch it, the one we are submitting to the 
GC thread:
   ```
            try {
               _gcTaskFutureMap.remove(rootPath);
               deleteStaleVersions(rootPath);
             } catch (Exception ex) {
               LOG.error("Failed to delete the stale versions.", ex);
             }
           }, _versionTTLms, TimeUnit.MILLISECONDS));
   ```
   My understanding is that this should prevent the gc thread from crashing and 
just log the exception
   
   
   `compressedBucketRead` will still throw the exception though 



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

To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscr...@helix.apache.org
For additional commands, e-mail: reviews-h...@helix.apache.org

Reply via email to