resume group_id when group guard destruct
This commit is contained in:
8
deps/oblib/src/lib/worker.h
vendored
8
deps/oblib/src/lib/worker.h
vendored
@ -220,7 +220,7 @@ public:
|
|||||||
~ConsumerGroupIdGuard()
|
~ConsumerGroupIdGuard()
|
||||||
{
|
{
|
||||||
if (group_changed_) {
|
if (group_changed_) {
|
||||||
// SET_GROUP_ID(thread_group_id_);
|
SET_GROUP_ID(thread_group_id_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int get_ret()
|
int get_ret()
|
||||||
@ -241,7 +241,7 @@ public:
|
|||||||
ConsumerGroupFuncGuard(uint8_t func_type)
|
ConsumerGroupFuncGuard(uint8_t func_type)
|
||||||
: thread_group_id_(GET_GROUP_ID()), thread_func_type_(GET_FUNC_TYPE()), group_changed_(false), ret_(OB_SUCCESS)
|
: thread_group_id_(GET_GROUP_ID()), thread_func_type_(GET_FUNC_TYPE()), group_changed_(false), ret_(OB_SUCCESS)
|
||||||
{
|
{
|
||||||
// THIS_WORKER.set_func_type_(func_type);
|
THIS_WORKER.set_func_type_(func_type);
|
||||||
uint64_t group_id = 0;
|
uint64_t group_id = 0;
|
||||||
ret_ = CONVERT_FUNCTION_TYPE_TO_GROUP_ID(func_type, group_id);
|
ret_ = CONVERT_FUNCTION_TYPE_TO_GROUP_ID(func_type, group_id);
|
||||||
if (OB_SUCCESS == ret_ && is_user_group(group_id) && group_id != thread_group_id_) {
|
if (OB_SUCCESS == ret_ && is_user_group(group_id) && group_id != thread_group_id_) {
|
||||||
@ -252,8 +252,8 @@ public:
|
|||||||
~ConsumerGroupFuncGuard()
|
~ConsumerGroupFuncGuard()
|
||||||
{
|
{
|
||||||
if (group_changed_) {
|
if (group_changed_) {
|
||||||
// SET_GROUP_ID(thread_group_id_);
|
SET_GROUP_ID(thread_group_id_);
|
||||||
// THIS_WORKER.set_func_type_(thread_func_type_);
|
THIS_WORKER.set_func_type_(thread_func_type_);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
int get_ret()
|
int get_ret()
|
||||||
|
|||||||
Reference in New Issue
Block a user