Skip to content

Commit

Permalink
review
Browse files Browse the repository at this point in the history
  • Loading branch information
vkorukanti committed May 16, 2024
1 parent 34af745 commit 96136a1
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@
* Throws when the {@link Engine} encountered an error while executing an operation.
*/
public class KernelEngineException extends RuntimeException {
private static final String msgT = "Encountered an error from the underlying engine " +
private static final String msgTemplate = "Encountered an error from the underlying engine " +
"implementation while trying to %s: %s";

public KernelEngineException(String attemptedOperation, Throwable cause) {
super(String.format(msgT, attemptedOperation, cause.getMessage()), cause);
super(String.format(msgTemplate, attemptedOperation, cause.getMessage()), cause);
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,8 @@ private Optional<CheckpointMetaData> loadMetadataFromFile(Engine engine, int tri
} else if (cause instanceof Exception) {
String msg = String.format(
"Failed to load checkpoint metadata from file %s. " +
"It must be in the process of being writing. " +
"Retrying after 1sec. (current attempt = %s)",
"It must be in the process of being written. " +
"Retrying after 1sec. (current attempt of %s (max 3)",
lastCheckpointFilePath, tries);
logger.warn(msg, cause);
// we can retry until max tries are exhausted. It saves latency as the alternative
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,9 @@ public interface CloseableIterator<T> extends Iterator<T>, Closeable {
* {@link IOException} thrown while trying to read from a Delta
* log file. It will be wrapped in this exception as cause.
* @throws KernelException When encountered an operation or state that is invalid or
* unsupported.
* unsupported in Kernel. For example, trying to read from a
* Delta table that has advanced features which are not yet
* supported by Kernel.
*/
@Override
T next();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -326,6 +326,8 @@ class LogReplayMetricsSuite extends QueryTest
expParquetVersionsRead = Seq(10),
// we read the checkpoint twice: once for the P &M and once for the scan files
expParquetReadSetSizes = Seq(1, 1),
// We try to read `_last_checkpoint` once. If it doesn't exist, we don't try reading
// again. If it exists, we succeed reading in the first time
expLastCheckpointReadCalls = Some(1)
)
}
Expand Down

0 comments on commit 96136a1

Please sign in to comment.