Ken Krugler
06/17/2021, 3:38 PMSegmentDeletionManager.removeAgedDeletedSegments()
, there’s this bit of code:
try {
// Check that the directory for deleted segments exists.
if (!pinotFS.isDirectory(deletedDirURI)) {
LOGGER.warn("Deleted segment directory {} does not exist or it is not directory.", deletedDirURI.toString());
return;
}
But if we’ve never deleted any segments, then this directory won’t exist yet. So shouldn’t this check be “if it exists && it’s not a directory”? Otherwise we get regular warnings in our log files, which trigger an alert, etc, etc.Ken Krugler
06/17/2021, 3:41 PMHadoopPinotFS.isDirectory()
call throws a FileNotFoundException
in this case, which isn’t caught in this method, bubbles, up, and generates a Could not get file status for hdfs:///user/hadoop/pinot-beta/pinot-segments//Deleted_Segments
error.Ken Krugler
06/17/2021, 3:41 PMMayank
1. What is the expected behavior wrt Deleted Segments directory? Is it that if directory does not exist then we don't save, or is it that we always save, in which case we should create this directory in ControllerStarter.
2. Depending on what's the consensus on 1, we can either assert or make this a debug message after adding Ken's suggested check, instead of warn.
Mayank
Mayank
Ken Krugler
06/17/2021, 4:44 PMKen Krugler
06/17/2021, 4:45 PMMayank
Mayank
Ken Krugler
06/17/2021, 5:15 PMKen Krugler
06/23/2021, 6:46 PM