not need to deserialize again (#5644)

Co-authored-by: wangxixu <wangxixu@xiaomi.com>
This commit is contained in:
xinghuayu007
2021-04-21 09:23:12 +08:00
committed by GitHub
parent be733cfa9c
commit ab64dbe65d
3 changed files with 0 additions and 13 deletions

View File

@ -85,7 +85,6 @@ OLAPStatus RowsetMetaManager::save(OlapMeta* meta, TabletUid tablet_uid, const R
std::string key = ROWSET_PREFIX + tablet_uid.to_string() + "_" + rowset_id.to_string();
std::string value;
bool ret = rowset_meta_pb.SerializeToString(&value);
;
if (!ret) {
std::string error_msg = "serialize rowset pb failed. rowset id:" + key;
LOG(WARNING) << error_msg;

View File

@ -304,12 +304,6 @@ OLAPStatus TabletMeta::serialize(string* meta_binary) {
if (!serialize_success) {
LOG(FATAL) << "failed to serialize meta " << full_name();
}
// deserialize the meta to check the result is correct
TabletMetaPB de_tablet_meta_pb;
bool parsed = de_tablet_meta_pb.ParseFromString(*meta_binary);
if (!parsed) {
LOG(FATAL) << "deserialize from previous serialize result failed " << full_name();
}
return OLAP_SUCCESS;
}

View File

@ -104,12 +104,6 @@ OLAPStatus TabletMetaManager::save(DataDir* store, TTabletId tablet_id, TSchemaH
VLOG_NOTICE << "save tablet meta to meta store: key = " << key;
OlapMeta* meta = store->get_meta();
TabletMetaPB de_tablet_meta_pb;
bool parsed = de_tablet_meta_pb.ParseFromString(meta_binary);
if (!parsed) {
LOG(FATAL) << "deserialize from previous serialize result failed";
}
LOG(INFO) << "save tablet meta "
<< ", key:" << key << " meta_size=" << meta_binary.length();
return meta->put(META_COLUMN_FAMILY_INDEX, key, meta_binary);