Skip to content

Commit

Permalink
[Kernel] Change Class.forName() usage in the LogStoreProvider. (#…
Browse files Browse the repository at this point in the history
…3304)

## Description

Look for the `LogStore` class more broadly in the class loader than just
the thread local's class loader. The thread context class loader
requires the Thread local variables to have the `LogStore` in it, but
this class loader may not have all the dependencies wired up.

## How was this patch tested?
Not tested yet.

Fixes #3299.
  • Loading branch information
abhishekrb19 authored Jun 24, 2024
1 parent 05e647a commit 1bccf8d
Showing 1 changed file with 1 addition and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,11 +93,7 @@ static String getLogStoreSchemeConfKey(String scheme) {
*/
private static Class<? extends LogStore> getLogStoreClass(String logStoreClassName)
throws ClassNotFoundException {
return Class.forName(
logStoreClassName,
true /* initialize */,
Thread.currentThread().getContextClassLoader())
.asSubclass(LogStore.class);
return Class.forName(logStoreClassName).asSubclass(LogStore.class);
}

private static LogStore createLogStore(
Expand Down

0 comments on commit 1bccf8d

Please sign in to comment.