S390 Linux is failing tests ColumnFamilyOptionsTest.cfPaths (#7853)
Summary: Fix ColumnFamilyOptionsTest.cfPaths and OptionsTest.cfPaths in 6.15 branch (and probably other branches including master) has_exception variable was not initialized which was causing test failures and incorrect behavior on s390 platform (and maybe others as variable content is undefined). adamretter please take a look. Pull Request resolved: https://github.com/facebook/rocksdb/pull/7853 Reviewed By: akankshamahajan15 Differential Revision: D25901639 Pulled By: jay-zhuang fbshipit-source-id: 151b5db27b495fc6d8ed54c0eccbde2508215ac5
This commit is contained in:
parent
7189ea8fb7
commit
ac956f2bea
@ -15,7 +15,7 @@
|
||||
*/
|
||||
jlong Java_org_rocksdb_ConcurrentTaskLimiterImpl_newConcurrentTaskLimiterImpl0(
|
||||
JNIEnv* env, jclass, jstring jname, jint limit) {
|
||||
jboolean has_exception;
|
||||
jboolean has_exception = JNI_FALSE;
|
||||
std::string name =
|
||||
ROCKSDB_NAMESPACE::JniUtil::copyStdString(env, jname, &has_exception);
|
||||
if (JNI_TRUE == has_exception) {
|
||||
|
@ -945,6 +945,7 @@ rocksdb_convert_cf_paths_from_java_helper(JNIEnv* env, jobjectArray path_array,
|
||||
jlong* size_array_ptr = env->GetLongArrayElements(size_array, nullptr);
|
||||
if (nullptr == size_array_ptr) {
|
||||
// exception thrown: OutOfMemoryError
|
||||
*has_exception = JNI_TRUE;
|
||||
return {};
|
||||
}
|
||||
std::vector<ROCKSDB_NAMESPACE::DbPath> cf_paths;
|
||||
@ -977,7 +978,7 @@ void Java_org_rocksdb_Options_setCfPaths(JNIEnv* env, jclass, jlong jhandle,
|
||||
jobjectArray path_array,
|
||||
jlongArray size_array) {
|
||||
auto* options = reinterpret_cast<ROCKSDB_NAMESPACE::Options*>(jhandle);
|
||||
jboolean has_exception;
|
||||
jboolean has_exception = JNI_FALSE;
|
||||
std::vector<ROCKSDB_NAMESPACE::DbPath> cf_paths =
|
||||
rocksdb_convert_cf_paths_from_java_helper(env, path_array, size_array,
|
||||
&has_exception);
|
||||
@ -4142,7 +4143,7 @@ void Java_org_rocksdb_ColumnFamilyOptions_setCfPaths(JNIEnv* env, jclass,
|
||||
jlongArray size_array) {
|
||||
auto* options =
|
||||
reinterpret_cast<ROCKSDB_NAMESPACE::ColumnFamilyOptions*>(jhandle);
|
||||
jboolean has_exception;
|
||||
jboolean has_exception = JNI_FALSE;
|
||||
std::vector<ROCKSDB_NAMESPACE::DbPath> cf_paths =
|
||||
rocksdb_convert_cf_paths_from_java_helper(env, path_array, size_array,
|
||||
&has_exception);
|
||||
|
Loading…
Reference in New Issue
Block a user