Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clean up illegal grpc connections to reduce useless logs #9806

Open
solotzg opened this issue Jan 22, 2025 · 0 comments
Open

Clean up illegal grpc connections to reduce useless logs #9806

solotzg opened this issue Jan 22, 2025 · 0 comments
Labels
type/enhancement The issue or PR belongs to an enhancement.

Comments

@solotzg
Copy link
Contributor

solotzg commented Jan 22, 2025

Enhancement

  • Even if the target address is invalid, the grpc connection will continue to reconnect and output relevant logs.

  • For example: after a tikv is scaled in and the following duplicate logs are meaningless.

[2024/12/20 01:21:54.260 +00:00] [INFO] [Server.cpp:385] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 945, log msg : subchannel 0x7ee64a727400 {address=ipv4:172.16.48.14:20160, args=grpc.client_channel_factory=0x7ee9c46c03c0, grpc.default_authority=db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0x7ee9a6963b40, grpc.internal.security_connector=0x7ee44dbc7070, grpc.internal.subchannel_pool=0x7ee9c48d4190, 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=0x7ee9c48d42b0, grpc.server_uri=dns:///db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160}: connect failed: {\"created\":\"@1734657714.260802248\",\"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\":\"@1734657714.260791663\",\"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.16.48.14:20160\"}"] [source=grpc] [thread_id=3645]
[2024/12/20 01:21:54.261 +00:00] [INFO] [Server.cpp:385] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 884, log msg : subchannel 0x7ee64a727400 {address=ipv4:172.16.48.14:20160, args=grpc.client_channel_factory=0x7ee9c46c03c0, grpc.default_authority=db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0x7ee9a6963b40, grpc.internal.security_connector=0x7ee44dbc7070, grpc.internal.subchannel_pool=0x7ee9c48d4190, 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=0x7ee9c48d42b0, grpc.server_uri=dns:///db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160}: Retry immediately"] [source=grpc] [thread_id=3645]
[2024/12/20 01:21:54.261 +00:00] [INFO] [Server.cpp:385] ["/workspace/source/tiflash/contrib/grpc/src/core/ext/filters/client_channel/subchannel.cc, line number: 910, log msg : subchannel 0x7ee64a727400 {address=ipv4:172.16.48.14:20160, args=grpc.client_channel_factory=0x7ee9c46c03c0, grpc.default_authority=db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160, grpc.http2_scheme=https, grpc.initial_reconnect_backoff_ms=1000, grpc.internal.channel_credentials=0x7ee9a6963b40, grpc.internal.security_connector=0x7ee44dbc7070, grpc.internal.subchannel_pool=0x7ee9c48d4190, 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=0x7ee9c48d42b0, grpc.server_uri=dns:///db-tikv-7.db-tikv-peer.tidb10096900833626871784.svc:20160}: failed to connect to channel, retrying"] [source=grpc] [thread_id=3645]
  • TiFlash needs a reasonable mechanism to clean up illegal grpc connections to reduce useless logs.
@solotzg solotzg added the type/enhancement The issue or PR belongs to an enhancement. label Jan 22, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/enhancement The issue or PR belongs to an enhancement.
Projects
None yet
Development

No branches or pull requests

1 participant