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

[fix] Fixed segment fault due to lambda may capture the thread_context reference with error address #249

Merged
merged 1 commit into from
Jun 9, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,6 @@ class RedisWrapper<RedisInstance, K, V,
} catch (const std::exception &err) {
LOG(ERROR) << "RedisHandler error in PipeExecRead for slices "
<< hkey.data() << " -- " << err.what();
error_ptr = std::current_exception();
throw(err);
}
} else {
return nullptr;
Expand All @@ -194,8 +192,6 @@ class RedisWrapper<RedisInstance, K, V,
} catch (const std::exception &err) {
LOG(ERROR) << "RedisHandler error in PipeExecWrite for slices "
<< hkey.data() << " -- " << err.what();
error_ptr = std::current_exception();
throw(err);
}
} else {
return nullptr;
Expand Down Expand Up @@ -1004,7 +1000,7 @@ every bucket has its own BucketContext for sending data---for locating reply-
try {
for (unsigned i = 0; i < storage_slice; ++i) {
results.emplace_back(
network_worker_pool->enqueue([this, &cmd, &thread_context, i] {
network_worker_pool->enqueue([this, &cmd, thread_context, i] {
return PipeExecRead(cmd, 3U, thread_context->buckets[i]);
}));
}
Expand Down Expand Up @@ -1228,7 +1224,7 @@ every bucket has its own BucketContext for sending data---for locating reply-
try {
for (unsigned i = 0; i < storage_slice; ++i) {
results.emplace_back(
network_worker_pool->enqueue([this, &cmd, &thread_context, i] {
network_worker_pool->enqueue([this, &cmd, thread_context, i] {
return PipeExecWrite(cmd, 4U, thread_context->buckets[i]);
}));
}
Expand Down Expand Up @@ -1330,7 +1326,7 @@ every bucket has its own BucketContext for sending data---for locating reply-
try {
for (unsigned i = 0; i < storage_slice; ++i) {
results.emplace_back(
network_worker_pool->enqueue([this, &cmd, &thread_context, i] {
network_worker_pool->enqueue([this, &cmd, thread_context, i] {
rhdong marked this conversation as resolved.
Show resolved Hide resolved
return PipeExecWrite(cmd, 6U, thread_context->buckets[i]);
}));
}
Expand Down Expand Up @@ -1411,7 +1407,7 @@ every bucket has its own BucketContext for sending data---for locating reply-
try {
for (unsigned i = 0; i < storage_slice; ++i) {
results.emplace_back(
network_worker_pool->enqueue([this, &cmd, &thread_context, i] {
network_worker_pool->enqueue([this, &cmd, thread_context, i] {
return PipeExecWrite(cmd, 3U, thread_context->buckets[i]);
}));
}
Expand Down