diff --git a/src/observer/storage/index/bplus_tree.cpp b/src/observer/storage/index/bplus_tree.cpp index aa63c63c7..aca159f54 100644 --- a/src/observer/storage/index/bplus_tree.cpp +++ b/src/observer/storage/index/bplus_tree.cpp @@ -312,7 +312,8 @@ RC LeafIndexNodeHandler::move_to(LeafIndexNodeHandler &other) other.append(__item_at(0), this->size()); other.set_next_page(this->next_page()); - RC rc = mtr_.logger().node_remove_items(*this, 0, span(__item_at(0), this->size() * item_size()), this->size()); + RC rc = mtr_.logger().node_remove_items(*this, 0, span(__item_at(0), static_cast(this->size()) * static_cast(item_size())), this->size()); + if (OB_FAIL(rc)) { LOG_WARN("failed to log shrink leaf node. rc=%s", strrc(rc)); } @@ -324,7 +325,7 @@ RC LeafIndexNodeHandler::move_to(LeafIndexNodeHandler &other) // 复制一些数据到当前节点的最右边 RC LeafIndexNodeHandler::append(const char *items, int num) { - RC rc = mtr_.logger().node_insert_items(*this, size(), span(items, num * item_size()), num); + RC rc = mtr_.logger().node_insert_items(*this, size(), span(items, static_cast(num) * static_cast(item_size())), num); if (OB_FAIL(rc)) { LOG_WARN("failed to log append items. rc=%d:%s", rc, strrc(rc)); return rc;