xiaokang commented on code in PR #28045:
URL: https://github.com/apache/doris/pull/28045#discussion_r1416835226
##########
be/src/olap/tablet.cpp:
##########
@@ -242,6 +242,11 @@ void
WriteCooldownMetaExecutors::WriteCooldownMetaExecutors::submit(TabletShared
TabletSharedPtr Tablet::create_tablet_from_meta(TabletMetaSharedPtr
tablet_meta,
DataDir* data_dir) {
+ if (tablet_meta->partition_id() <= 0) {
+ LOG(WARNING) << "invalid partition id " << tablet_meta->partition_id()
<< ", tablet "
+ << tablet_meta->tablet_id();
+ return nullptr;
Review Comment:
Will it cause NPE for caller?
##########
be/src/olap/txn_manager.cpp:
##########
@@ -257,9 +257,10 @@ Status TxnManager::commit_txn(OlapMeta* meta, TPartitionId
partition_id,
const PUniqueId& load_id, const RowsetSharedPtr&
rowset_ptr,
bool is_recovery) {
if (partition_id < 1 || transaction_id < 1 || tablet_id < 1) {
- LOG(FATAL) << "invalid commit req "
- << " partition_id=" << partition_id << " transaction_id="
<< transaction_id
- << " tablet_id=" << tablet_id;
+ LOG(WARNING) << "invalid commit req "
+ << " partition_id=" << partition_id << " transaction_id="
<< transaction_id
+ << " tablet_id=" << tablet_id;
+ return Status::InternalError("invalid partition id");
Review Comment:
It's dangerous if it will cause auto skip bad rowset.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]