Skip to content

Commit f3495f5

Browse files
committed
add log
1 parent 7b22b2e commit f3495f5

File tree

2 files changed

+15
-10
lines changed

2 files changed

+15
-10
lines changed

be/src/cloud/cloud_tablet.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -884,14 +884,15 @@ Status CloudTablet::calc_delete_bitmap_for_compaction(
884884
}
885885

886886
// 3. store delete bitmap
887-
RETURN_IF_ERROR(_engine.meta_mgr().update_delete_bitmap(*this, -1, initiator,
888-
output_rowset_delete_bitmap.get()));
887+
auto st = _engine.meta_mgr().update_delete_bitmap(*this, -1, initiator,
888+
output_rowset_delete_bitmap.get());
889889
int64_t t6 = MonotonicMicros();
890890
LOG(INFO) << "calc_delete_bitmap_for_compaction, tablet_id=" << tablet_id()
891891
<< ", get lock cost " << (t2 - t1) << " us, sync rowsets cost " << (t3 - t2)
892892
<< " us, calc delete bitmap cost " << (t4 - t3) << " us, check rowid conversion cost "
893-
<< (t5 - t4) << " us, store delete bitmap cost " << (t6 - t5) << " us";
894-
return Status::OK();
893+
<< (t5 - t4) << " us, store delete bitmap cost " << (t6 - t5)
894+
<< " us, st=" << st.to_string();
895+
return st;
895896
}
896897

897898
Status CloudTablet::sync_meta() {

cloud/src/meta-service/meta_service.cpp

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1837,7 +1837,8 @@ void MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
18371837
txn->put(pending_key, pending_val);
18381838
fdb_txn_size = fdb_txn_size + pending_key.size() + pending_val.size();
18391839
LOG(INFO) << "xxx update delete bitmap put pending_key=" << hex(pending_key)
1840-
<< " lock_id=" << request->lock_id() << " value_size: " << pending_val.size();
1840+
<< " lock_id=" << request->lock_id() << " initiator=" << request->initiator()
1841+
<< " value_size: " << pending_val.size();
18411842
} else if (request->lock_id() == -3) {
18421843
// delete existing key
18431844
for (size_t i = 0; i < request->rowset_ids_size(); ++i) {
@@ -1866,15 +1867,16 @@ void MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
18661867
if (txn->approximate_bytes() + key.size() * 3 + val.size() > config::max_txn_commit_byte) {
18671868
LOG(INFO) << "fdb txn size more than " << config::max_txn_commit_byte
18681869
<< ", current size: " << txn->approximate_bytes()
1869-
<< " lock_id=" << request->lock_id() << ", need to commit";
1870+
<< " lock_id=" << request->lock_id() << " initiator=" << request->initiator()
1871+
<< ", need to commit";
18701872
err = txn->commit();
18711873
total_txn_put_keys += txn->num_put_keys();
18721874
total_txn_put_bytes += txn->put_bytes();
18731875
total_txn_size += txn->approximate_bytes();
18741876
if (err != TxnErrorCode::TXN_OK) {
18751877
code = cast_as<ErrCategory::COMMIT>(err);
18761878
ss << "failed to update delete bitmap, err=" << err << " tablet_id=" << tablet_id
1877-
<< " lock_id=" << request->lock_id()
1879+
<< " lock_id=" << request->lock_id() << " initiator=" << request->initiator()
18781880
<< " delete_bitmap_key=" << current_key_count
18791881
<< " delete_bitmap_value=" << current_value_count
18801882
<< " put_size=" << txn->put_bytes() << " num_put_keys=" << txn->num_put_keys()
@@ -1907,8 +1909,8 @@ void MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
19071909
total_key_count++;
19081910
total_value_count += val.size();
19091911
VLOG_DEBUG << "xxx update delete bitmap put delete_bitmap_key=" << hex(key)
1910-
<< " lock_id=" << request->lock_id() << " key_size: " << key.size()
1911-
<< " value_size: " << val.size();
1912+
<< " lock_id=" << request->lock_id() << " initiator=" << request->initiator()
1913+
<< " key_size: " << key.size() << " value_size: " << val.size();
19121914
}
19131915
err = txn->commit();
19141916
total_txn_put_keys += txn->num_put_keys();
@@ -1917,13 +1919,15 @@ void MetaServiceImpl::update_delete_bitmap(google::protobuf::RpcController* cont
19171919
if (err != TxnErrorCode::TXN_OK) {
19181920
code = cast_as<ErrCategory::COMMIT>(err);
19191921
ss << "failed to update delete bitmap, err=" << err << " tablet_id=" << tablet_id
1920-
<< " lock_id=" << request->lock_id() << " delete_bitmap_key=" << current_key_count
1922+
<< " lock_id=" << request->lock_id() << " initiator=" << request->initiator()
1923+
<< " delete_bitmap_key=" << current_key_count
19211924
<< " delete_bitmap_value=" << current_value_count << " put_size=" << txn->put_bytes()
19221925
<< " num_put_keys=" << txn->num_put_keys() << " txn_size=" << txn->approximate_bytes();
19231926
msg = ss.str();
19241927
return;
19251928
}
19261929
LOG(INFO) << "update_delete_bitmap tablet_id=" << tablet_id << " lock_id=" << request->lock_id()
1930+
<< " initiator=" << request->initiator()
19271931
<< " rowset_num=" << request->rowset_ids_size()
19281932
<< " total_key_count=" << total_key_count
19291933
<< " total_value_count=" << total_value_count << " unlock=" << unlock

0 commit comments

Comments
 (0)