[CP] fix blacklist compare blkey use hash value erroneously
This commit is contained in:
@ -95,15 +95,19 @@ public:
|
|||||||
}
|
}
|
||||||
int compare(const ObBLKey &other) const
|
int compare(const ObBLKey &other) const
|
||||||
{
|
{
|
||||||
int ret = server_.compare(other.server_);
|
int ret = 0;
|
||||||
if (0 == ret) {
|
if (this == &other) {
|
||||||
if (tenant_id_ > other.tenant_id_) {
|
ret = 0;
|
||||||
|
} else if (0 != (ret = server_.compare(other.get_server()))) {
|
||||||
|
// do nothing
|
||||||
|
} else if (0 != (ret = ls_id_.compare(other.get_ls_id()))) {
|
||||||
|
// do nothing
|
||||||
|
} else if (tenant_id_ > other.tenant_id_) {
|
||||||
ret = 1;
|
ret = 1;
|
||||||
} else if (tenant_id_ < other.tenant_id_) {
|
} else if (tenant_id_ < other.tenant_id_) {
|
||||||
ret = -1;
|
ret = -1;
|
||||||
} else {
|
} else {
|
||||||
ret = ls_id_.compare(other.ls_id_);
|
ret = 0;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user