Skip to content
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

Read value sometimes exists with strange signs at the end of value #69

Open
maxtju opened this issue Feb 9, 2022 · 1 comment
Open

Comments

@maxtju
Copy link

maxtju commented Feb 9, 2022

I add key-vals by myself (with python script) and checking what was read after the add.
For example this pair was created:

INFO:root:Key: confidence_thresh ---> Value: 0.65 (READ: b'0.65')

But when Im reading this value thourgh c++ code:

std::vectorstd::string vKeys = m_pKv->keys(strKeysPrefix);
for (auto key : vKeys)
{
auto kvs = m_pKv->item(key);
std::cout << ">>> " << kvs.value << " -> " << kvs.value.size() << " [" << (int)kvs.value.back() - 'a' << "]" << std::endl;
}

I receive the following:

0.65� -> 6 [93]

As you can see there is nothing added to the value. Do you have any thoughts what Im doing wrongly ?
Thank you & best regards
Max

@oliora
Copy link
Owner

oliora commented Feb 9, 2022

That’s quite strange.

Are you able to reproduce it with any key/value?

Is it stable (every time you read it is corrupted like this) or flips between correct and corrupted?

What is your OS and compiler? Which version of Consul do you use? Are you using the latest Ppconsul?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants