mirror of
https://github.com/vale981/ray
synced 2025-03-06 02:21:39 -05:00
fix bug: (#3000)
before fix,RAY_FUN_CACHE use only get method ,can only get null fix : put after create
This commit is contained in:
parent
3ce8eb2d4c
commit
9c606ea06c
1 changed files with 2 additions and 1 deletions
|
@ -28,7 +28,7 @@ public class FunctionManager {
|
|||
* Cache from a RayFunc object to its corresponding FunctionDescriptor. Because
|
||||
* `LambdaUtils.getSerializedLambda` is expensive.
|
||||
*/
|
||||
private static final ThreadLocal<WeakHashMap<Class<RayFunc>, FunctionDescriptor>>
|
||||
private static final ThreadLocal<WeakHashMap<Class<? extends RayFunc>, FunctionDescriptor>>
|
||||
RAY_FUNC_CACHE = ThreadLocal.withInitial(WeakHashMap::new);
|
||||
|
||||
/**
|
||||
|
@ -51,6 +51,7 @@ public class FunctionManager {
|
|||
final String methodName = serializedLambda.getImplMethodName();
|
||||
final String typeDescriptor = serializedLambda.getImplMethodSignature();
|
||||
functionDescriptor = new FunctionDescriptor(className, methodName, typeDescriptor);
|
||||
RAY_FUNC_CACHE.get().put(func.getClass(),functionDescriptor);
|
||||
}
|
||||
return getFunction(driverId, functionDescriptor);
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue