tanruixiang commented on PR #882:
URL:
https://github.com/apache/incubator-kvrocks/pull/882#issuecomment-1250096015
@PragmaTwice @git-hulk @torwig I noticed a problem. In the following tests.
When we write a value with only one bit(like 'a'). Occasionally, the size of
the key we get is 0. It occurs frequently when the value is very small. I guess
the reason for this problem is that sync in writeoption defaults to false.
```
std::vector<int> value_size{1, 1024};
for(auto &p : value_size){
EXPECT_TRUE(string->Set(key_, std::string(p, 'a')).ok());
std::string got_value;
EXPECT_TRUE(string->Get(key_, &got_value).ok());
EXPECT_EQ(got_value, std::string(p, 'a'));
std::string value;
string->Get(key_, &value);
uint64_t result = 0;
EXPECT_TRUE(disk->GetKeySize(key_, kRedisString, &result).ok());
EXPECT_GE(result, p);
}
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]