kevincai commented on code in PR #6969:
URL: https://github.com/apache/hadoop/pull/6969#discussion_r1721200295
##########
hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c:
##########
@@ -818,26 +818,31 @@ JNIEnv* getJNIEnv(void)
fprintf(stderr, "getJNIEnv: Unable to create ThreadLocalState\n");
return NULL;
}
- if (threadLocalStorageSet(state)) {
- mutexUnlock(&jvmMutex);
- goto fail;
- }
- THREAD_LOCAL_STORAGE_SET_QUICK(state);
state->env = getGlobalJNIEnv();
- mutexUnlock(&jvmMutex);
-
if (!state->env) {
+ mutexUnlock(&jvmMutex);
goto fail;
Review Comment:
has a log line there in line 849, will it be necessary to add one more log
here? I am opt not to. What do you think? @Hexiaoqiao
```
fail:
fprintf(stderr, "getJNIEnv: getGlobalJNIEnv failed\n");
```
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]