@@ -450,6 +450,7 @@ int ObTabletMeta::init(
450450 extra_medium_info_ = param.extra_medium_info_ ;
451451 split_info_ = param.split_info_ ;
452452 has_truncate_info_ = param.has_truncate_info_ ;
453+ fork_info_ = param.fork_info_ ;
453454 if (param.version_ < ObMigrationTabletParam::PARAM_VERSION_V3 ) {
454455 int64_t tmp_pos = 0 ;
455456 const ObString &user_data = param.mds_data_ .tablet_status_committed_kv_ .v_ .user_data_ ;
@@ -624,6 +625,7 @@ int ObTabletMeta::init(
624625 has_next_tablet_ = old_tablet_meta.has_next_tablet_ ;
625626 micro_index_clustered_ = old_tablet_meta.micro_index_clustered_ ;
626627 split_info_ = OB_ISNULL (tablet_meta) ? old_tablet_meta.split_info_ : tablet_meta->split_info_ ; // migration sstables replaces split status.
628+ fork_info_ = OB_ISNULL (tablet_meta) ? old_tablet_meta.fork_info_ : tablet_meta->fork_info_ ;
627629 if (old_tablet_meta.has_truncate_info_ || (OB_NOT_NULL (tablet_meta) && tablet_meta->has_truncate_info_ )) {
628630 has_truncate_info_ = true ;
629631 }
@@ -1379,6 +1381,8 @@ int ObMigrationTabletParam::serialize(char *buf, const int64_t len, int64_t &pos
13791381 LOG_WARN (" failed to serialize split info" , K (ret), K (len), K (new_pos), K_ (split_info));
13801382 } else if (PARAM_VERSION_V3 <= version_ && new_pos - pos < length && OB_FAIL (serialization::encode_bool (buf, len, new_pos, has_truncate_info_))) {
13811383 LOG_WARN (" failed to serialize has_truncate_info" , K (ret), K (len), K (new_pos), K_ (has_truncate_info));
1384+ } else if (PARAM_VERSION_V3 <= version_ && new_pos - pos < length && OB_FAIL (fork_info_.serialize (buf, len, new_pos))) {
1385+ LOG_WARN (" failed to serialize fork info" , K (ret), K (len), K (new_pos), K_ (fork_info));
13821386 } else if (OB_UNLIKELY (length != new_pos - pos)) {
13831387 ret = OB_ERR_UNEXPECTED ;
13841388 LOG_WARN (" length doesn't match standard length" , K (ret), K (new_pos), K (pos), K (length));
@@ -1476,6 +1480,8 @@ int ObMigrationTabletParam::deserialize_v2_v3(const char *buf, const int64_t len
14761480 LOG_WARN (" failed to deserialize split info" , K (ret), K (len));
14771481 } else if (PARAM_VERSION_V3 <= version_ && new_pos - pos < length && OB_FAIL (serialization::decode_bool (buf, len, new_pos, &has_truncate_info_))) {
14781482 LOG_WARN (" failed to deserialize has_truncate_info" , K (ret), K (len));
1483+ } else if (PARAM_VERSION_V3 <= version_ && new_pos - pos < length && OB_FAIL (fork_info_.deserialize (buf, len, new_pos))) {
1484+ LOG_WARN (" failed to deserialize fork info" , K (ret), K (len));
14791485 } else if (OB_UNLIKELY (length != new_pos - pos)) {
14801486 ret = OB_ERR_UNEXPECTED ;
14811487 LOG_WARN (" tablet's length doesn't match standard length" , K (ret), K (new_pos), K (pos), K (length), KPC (this ));
@@ -1679,6 +1685,7 @@ int64_t ObMigrationTabletParam::get_serialize_size() const
16791685 size += serialization::encoded_length_bool (is_storage_schema_cs_replica_);
16801686 size += split_info_.get_serialize_size ();
16811687 size += serialization::encoded_length_bool (has_truncate_info_);
1688+ size += fork_info_.get_serialize_size ();
16821689 }
16831690 return size;
16841691}
@@ -1723,6 +1730,7 @@ void ObMigrationTabletParam::reset()
17231730 is_storage_schema_cs_replica_ = false ;
17241731 split_info_.reset ();
17251732 has_truncate_info_ = false ;
1733+ fork_info_.reset ();
17261734 allocator_.reset ();
17271735}
17281736
@@ -1768,6 +1776,7 @@ int ObMigrationTabletParam::assign(const ObMigrationTabletParam ¶m)
17681776 is_storage_schema_cs_replica_ = param.is_storage_schema_cs_replica_ ;
17691777 split_info_ = param.split_info_ ;
17701778 has_truncate_info_ = param.has_truncate_info_ ;
1779+ fork_info_ = param.fork_info_ ;
17711780 if (OB_FAIL (mds_data_.assign (param.mds_data_ , allocator_))) {
17721781 LOG_WARN (" failed to assign mds data" , K (ret), K (param));
17731782 } else if (OB_FAIL (last_persisted_committed_tablet_status_.assign (
0 commit comments