Skip to content

Reduce the number of useless logging #10464

@JaySon-Huang

Description

@JaySon-Huang

Enhancement

The top 2 kind of logging, command.rs:169 and Server.cpp:458, is about 57% of the total number of logging.

logging with command.rs:169

[2025/09/02 06:58:39.831 +00:00] [INFO] [command.rs:169] ["can't flush data, filter CompactLog"] [compact_term=15] [compact_index=11498950] [term=15] [index=11498952] [region_epoch="conf_ver: 114 version: 125"] [region_id=7682805]
[2025/09/02 06:58:39.831 +00:00] [INFO] [command.rs:169] ["can't flush data, filter CompactLog"] [compact_term=15] [compact_index=11498950] [term=15] [index=11498952] [region_epoch="conf_ver: 114 version: 125"] [region_id=7682805]

logging with Server.cpp:458

[2025/09/02 06:58:39.826 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 910, log msg : subchannel 0xfff8e1bcd800 {address=ipv4:172.26.150.150:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff963ec14f0, grpc.internal.security_connector=0xfff8e3c04c30, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160}: failed to connect to channel, retrying"] [source=grpc] [thread_id=299109]
[2025/09/02 06:58:39.825 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 884, log msg : subchannel 0xfff8e1bcd800 {address=ipv4:172.26.150.150:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff963ec14f0, grpc.internal.security_connector=0xfff8e3c04c30, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160}: Retry immediately"] [source=grpc] [thread_id=299109]
[2025/09/02 06:58:39.825 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 945, log msg : subchannel 0xfff8e1bcd800 {address=ipv4:172.26.150.150:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff963ec14f0, grpc.internal.security_connector=0xfff8e3c04c30, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-254.db-tikv-peer.tidb1379661944646416027.svc:20160}: connect failed: {\"created\":\"@1756796319.825812940\",\"description\":\"Failed to connect to remote host: FD Shutdown\",\"file\":\"/workspace/source/tiflash/contrib/grpc/src/core/lib/iomgr/lockfree_event.cc\",\"file_line\":217,\"os_error\":\"Timeout occurred\",\"referenced_errors\":[{\"created\":\"@1756796319.825800731\",\"description\":\"connect() timed out\",\"file\":\"/workspace/source/tiflash/contrib/grpc/src/core/lib/iomgr/tcp_client_posix.cc\",\"file_line\":114}],\"target_address\":\"ipv4:172.26.150.150:20160\"}"] [source=grpc] [thread_id=299109]
[2025/09/02 06:58:39.791 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 910, log msg : subchannel 0xfff8e0bb8c00 {address=ipv4:172.26.29.139:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff961c78a30, grpc.internal.security_connector=0xfff8e3bd3140, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160}: failed to connect to channel, retrying"] [source=grpc] [thread_id=308388]
[2025/09/02 06:58:39.791 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 884, log msg : subchannel 0xfff8e0bb8c00 {address=ipv4:172.26.29.139:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff961c78a30, grpc.internal.security_connector=0xfff8e3bd3140, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160}: Retry immediately"] [source=grpc] [thread_id=308388]
[2025/09/02 06:58:39.791 +00:00] [INFO] [Server.cpp:458] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 945, log msg : subchannel 0xfff8e0bb8c00 {address=ipv4:172.26.29.139:20160, args=grpc.client_channel_factory=0xffff60301440, grpc.default_authority=db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0xfff961c78a30, grpc.internal.security_connector=0xfff8e3bd3140, grpc.internal.subchannel_pool=0xffff61353090, grpc.max_receive_message_length=-1, grpc.max_reconnect_backoff_ms=3000, grpc.min_reconnect_backoff_ms=1000, grpc.primary_user_agent=grpc-c++/1.44.0, grpc.resource_quota=0xffff613531b0, grpc.server_uri=dns:///db-tikv-253.db-tikv-peer.tidb1379661944646416027.svc:20160}: connect failed: {\"created\":\"@1756796319.791791749\",\"description\":\"Failed to connect to remote host: FD Shutdown\",\"file\":\"/workspace/source/tiflash/contrib/grpc/src/core/lib/iomgr/lockfree_event.cc\",\"file_line\":217,\"os_error\":\"Timeout occurred\",\"referenced_errors\":[{\"created\":\"@1756796319.791781623\",\"description\":\"connect() timed out\",\"file\":\"/workspace/source/tiflash/contrib/grpc/src/core/lib/iomgr/tcp_client_posix.cc\",\"file_line\":114}],\"target_address\":\"ipv4:172.26.29.139:20160\"}"] [source=grpc] [thread_id=308388]
Image

v7.5.6

Metadata

Metadata

Assignees

No one assigned

    Labels

    affects-7.1This bug affects the 7.1.x(LTS) versions.affects-7.5This bug affects the 7.5.x(LTS) versions.affects-8.1This bug affects the 8.1.x(LTS) versions.affects-8.5This bug affects the 8.5.x(LTS) versions.component/storagetype/enhancementThe issue or PR belongs to an enhancement.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions