Skip to content
Merged
Changes from 1 commit
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
8 changes: 6 additions & 2 deletions src/observer/storage/index/bplus_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,9 @@ 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<const char>(__item_at(0), this->size() * item_size()), this->size());
size_t converted_size = static_cast<size_t>(this->size());
size_t converted_item_size = static_cast<size_t>(item_size());
RC rc = mtr_->logger().node_remove_items(*this, 0, span<const char>(__item_at(0), converted_size * converted_item_size), this->size());
if (OB_FAIL(rc)) {
LOG_WARN("failed to log shrink leaf node. rc=%s", strrc(rc));
}
Expand All @@ -324,7 +326,9 @@ RC LeafIndexNodeHandler::move_to(LeafIndexNodeHandler &other)
// 复制一些数据到当前节点的最右边
RC LeafIndexNodeHandler::append(const char *items, int num)
{
RC rc = mtr_.logger().node_insert_items(*this, size(), span<const char>(items, num * item_size()), num);
size_t converted_num = static_cast<size_t>(num);
size_t converted_item_size = static_cast<size_t>(item_size());
RC rc = mtr_.logger().node_insert_items(*this, size(), span<const char>(items, converted_num * converted_item_size), num);
if (OB_FAIL(rc)) {
LOG_WARN("failed to log append items. rc=%d:%s", rc, strrc(rc));
return rc;
Expand Down
Loading