-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support zero byte value #63
Conversation
Brief Changes: ============== * Included null check on data pointer only when data length is not zero * Updated comments explaining relevant changes Testing Done: ============= * Manual testing with nvk_test_cli Signed-off-by: r.kavuluru <[email protected]>
[SPDK_TCP-NVMF/KVTRANS] Support zero byte value on target
…port-zero-byte-value
Looks good to me. |
Quality Gate passedIssues Measures |
@@ -764,7 +764,7 @@ nkv_result nkv_retrieve_kvp (uint64_t nkv_handle, nkv_io_context* ioctx, const n | |||
smg_info(logger, "NKV retrieve operation is successful for nkv_handle = %u, key = %s, key_length = %u, supplied length = %u, actual length = %u", | |||
nkv_handle, key ? (char*)key->key: "NULL", key ? key->length:0, value->length, value->actual_length); | |||
if (value->actual_length == 0) | |||
smg_error(logger, "NKV retrieve operation returned 0 value length object !!, nkv_handle = %u, key = %s, key_length = %u, supplied length = %u, actual length = %u", | |||
smg_warn(logger, "NKV retrieve operation returned 0 value length object !!, nkv_handle = %u, key = %s, key_length = %u, supplied length = %u, actual length = %u", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be better if this is debug log, if we are going to see this more frequently in the IO path.
@@ -1031,7 +1041,7 @@ nkv_result NKVTargetPath::do_retrieve_io_from_path(const nkv_key* n_key, const n | |||
int ret = kvs_retrieve_tuple(path_cont_handle, &kvskey, &kvsvalue, &ret_ctx); | |||
if(ret != KVS_SUCCESS ) { | |||
if (ret != KVS_ERR_KEY_NOT_EXIST) { | |||
smg_error(logger, "Retrieve tuple failed with error 0x%x - %s, key = %s, dev_path = %s, ip = %s", | |||
smg_warn(logger, "Retrieve tuple failed with error 0x%x - %s, key = %s, dev_path = %s, ip = %s", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is this warning? This should still be error I think.
This MR is for supporting zero byte value in the KV pair. Tools like IO500 first create file with empty/zero byte value in it and we need this zero byte value support within DSS for that. We had checks in multiple layers within dss-sdk stack to protect against zero byte value earlier. As part of this MR, we needed to modify code on those parts to gracefully handle zero byte value.
: Somnath Roy, [email protected]