Jackie-Jiang commented on a change in pull request #4882: Failure to recover
after segment reload failure does not release segment lock
URL: https://github.com/apache/incubator-pinot/pull/4882#discussion_r353478783
##########
File path:
pinot-server/src/main/java/org/apache/pinot/server/starter/helix/HelixInstanceDataManager.java
##########
@@ -237,8 +237,13 @@ private void reloadSegment(@Nonnull String
tableNameWithType, @Nonnull SegmentMe
// Delete segment temporary directory
FileUtils.deleteDirectory(segmentTempDir);
} finally {
- LoaderUtils.reloadFailureRecovery(indexDir);
- segmentLock.unlock();
+ try {
+ LoaderUtils.reloadFailureRecovery(indexDir);
+ } catch (Exception e) {
Review comment:
This exception can override the current exception, which is not desired.
I would recommend moving `LoaderUtils.reloadFailureRecovery(indexDir);`
after line 194 (recover the segment before trying to reload it)
----------------------------------------------------------------
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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]