diff --git a/java/rocksjni/transaction.cc b/java/rocksjni/transaction.cc index 62bf9e922..269602f21 100644 --- a/java/rocksjni/transaction.cc +++ b/java/rocksjni/transaction.cc @@ -611,7 +611,11 @@ void txn_write_kv_parts_helper(JNIEnv* env, const jint& jkey_parts_len, const jobjectArray& jvalue_parts, const jint& jvalue_parts_len) { +#ifndef DEBUG + (void) jvalue_parts_len; +#else assert(jkey_parts_len == jvalue_parts_len); +#endif auto key_parts = std::vector(); auto value_parts = std::vector(); diff --git a/java/rocksjni/writebatchhandlerjnicallback.cc b/java/rocksjni/writebatchhandlerjnicallback.cc index 69fe87659..bf9001110 100644 --- a/java/rocksjni/writebatchhandlerjnicallback.cc +++ b/java/rocksjni/writebatchhandlerjnicallback.cc @@ -306,7 +306,11 @@ rocksdb::Status WriteBatchHandlerJniCallback::PutBlobIndexCF(uint32_t column_fam } rocksdb::Status WriteBatchHandlerJniCallback::MarkBeginPrepare(bool unprepare) { +#ifndef DEBUG + (void) unprepare; +#else assert(!unprepare); +#endif m_env->CallVoidMethod(m_jcallback_obj, m_jMarkBeginPrepareMethodId); // check for Exception, in-particular RocksDBException