Hello,

When I read the codes of libhdfs, I found that the last exception string
was not cleaned before calling functions.

In more detail, an exception will be saved in `ThreadLocalState` by
`setTLSExceptionStrings` if it throws in function calling, then the
subsequent calling of `hdfsGetLastExceptionRootCause` will return the saved
exception strings. But the problem is even if the subsequent calling of
other functions, eg `hdfsExists`, returns success, the `
hdfsGetLastExceptionRootCause` still returns the former exception strings.

The related code is in:
https://github.com/apache/hadoop/blob/5cda162a804fb0cfc2a5ac0058ab407662c5fb00/hadoop-hdfs-project/hadoop-hdfs-native-client/src/main/native/libhdfs/jni_helper.c#L795-L809

Does anyone know if this behavior is expected?

Thanks

Reply via email to