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

geo: fix unable to rewrite error geo encoded data bug #174

Merged
merged 22 commits into from
Sep 3, 2018

Conversation

acelyc111
Copy link
Member

geo set/del API will return error when operate on an exist data which is not encoded by a predefined rule, it's a bug

cb(PERR_GEO_DECODE_VALUE_ERROR, pegasus_client::internal_info());
return;
keep_geo_data = true;
dwarn_f("generate_geo_keys failed");
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

应该把有问题的hashkey、sortkey、value也一起打出来?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

加到 geo_client::generate_geo_keys 函数里了,外层的就不重复加了

}

std::shared_ptr<int> ret = std::make_shared<int>(PERR_OK);
std::shared_ptr<std::atomic<int32_t>> del_count =
std::make_shared<std::atomic<int32_t>>(keep_common_data ? 1 : 2);
std::make_shared<std::atomic<int32_t>>(2);
if (keep_common_data) {
Copy link
Contributor

@shengofsun shengofsun Aug 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

当时接口上留了keep_common_data的作用是?搜了一下貌似没发现用的,都是填的false

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

有true的。作用是保留common table里的数据。在geo_client::async_set中,也就是写数据时,“keep”这条数据,因为是后面马上会overwrite他,可以少一次rpc

@acelyc111 acelyc111 merged commit cfa1b9d into apache:master Sep 3, 2018
@neverchanje neverchanje added the component/geo Pegasus GEO support label Sep 13, 2018
neverchanje pushed a commit to neverchanje/pegasus that referenced this pull request Jul 13, 2019
* fix unable to overwrite/remove error geo encoded value bug

Former-commit-id: 282cd9f8d4fd9e6f15659265874a515908872ebe [formerly cfa1b9d]
Former-commit-id: 7a080019d7bb67d43eec7664b81a078299322463
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/geo Pegasus GEO support
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants