optimize tablet to string
This commit is contained in:
@ -5886,38 +5886,28 @@ int ObTablet::build_transfer_tablet_param(
|
|||||||
int64_t ObTablet::to_string(char *buf, const int64_t buf_len) const
|
int64_t ObTablet::to_string(char *buf, const int64_t buf_len) const
|
||||||
{
|
{
|
||||||
int64_t pos = 0;
|
int64_t pos = 0;
|
||||||
if (OB_ISNULL(buf) || buf_len <= 0) {
|
if (OB_ISNULL(buf) || OB_UNLIKELY(buf_len <= 0)) {
|
||||||
// do nothing
|
// do nothing
|
||||||
} else {
|
} else {
|
||||||
J_OBJ_START();
|
J_OBJ_START();
|
||||||
J_NAME("ObTablet");
|
|
||||||
J_COLON();
|
|
||||||
J_KV(KP(this),
|
J_KV(KP(this),
|
||||||
|
K_(is_inited),
|
||||||
K_(wash_score),
|
K_(wash_score),
|
||||||
|
K_(hold_ref_cnt),
|
||||||
K_(ref_cnt),
|
K_(ref_cnt),
|
||||||
K_(version),
|
K_(version),
|
||||||
K_(length),
|
K_(length),
|
||||||
K_(tablet_addr),
|
K_(tablet_addr),
|
||||||
KP_(allocator),
|
KP_(allocator),
|
||||||
K_(tablet_meta),
|
K_(tablet_meta),
|
||||||
K_(table_store_cache),
|
|
||||||
KP_(ddl_kvs),
|
|
||||||
K_(ddl_kv_count),
|
|
||||||
K_(table_store_addr),
|
K_(table_store_addr),
|
||||||
K_(storage_schema_addr),
|
K_(storage_schema_addr),
|
||||||
K_(macro_info_addr),
|
K_(macro_info_addr),
|
||||||
K_(next_tablet_guard),
|
|
||||||
K_(pointer_hdl),
|
|
||||||
KP_(next_tablet),
|
|
||||||
KP_(log_handler),
|
|
||||||
KPC_(rowkey_read_info),
|
|
||||||
K_(mds_data),
|
K_(mds_data),
|
||||||
K_(hold_ref_cnt),
|
KP_(ddl_kvs),
|
||||||
K_(is_inited),
|
K_(ddl_kv_count));
|
||||||
K_(memtable_count));
|
|
||||||
J_COMMA();
|
J_COMMA();
|
||||||
BUF_PRINTF("memtables");
|
BUF_PRINTF("memtables:");
|
||||||
J_COLON();
|
|
||||||
J_ARRAY_START();
|
J_ARRAY_START();
|
||||||
for (int64_t i = 0; i < MAX_MEMSTORE_CNT; ++i) {
|
for (int64_t i = 0; i < MAX_MEMSTORE_CNT; ++i) {
|
||||||
if (i > 0) {
|
if (i > 0) {
|
||||||
@ -5926,6 +5916,8 @@ int64_t ObTablet::to_string(char *buf, const int64_t buf_len) const
|
|||||||
BUF_PRINTO(OB_P(memtables_[i]));
|
BUF_PRINTO(OB_P(memtables_[i]));
|
||||||
}
|
}
|
||||||
J_ARRAY_END();
|
J_ARRAY_END();
|
||||||
|
J_COMMA();
|
||||||
|
J_KV(K_(memtable_count));
|
||||||
J_OBJ_END();
|
J_OBJ_END();
|
||||||
}
|
}
|
||||||
return pos;
|
return pos;
|
||||||
|
|||||||
Reference in New Issue
Block a user