Skip to content

Conversation

drmingdrmer
Copy link
Member

@drmingdrmer drmingdrmer commented Oct 30, 2024

I hereby agree to the terms of the CLA available at: https://docs.databend.com/dev/policies/cla/

Summary

refactor: MetaGrpcClient needs to specify timeout to auto-reconnect to restarted server

Before c44ea20, MetaGrpcClient just
auto reconnect if the target meta-service server is restarted.

After c44ea20, the client behavior
changed, if no timeout is set, the client reconnect to the restarted
server but it hangs forever.

In this commit, in the test: test_kv_api_restart_cluster_token_expired,
give the client a fixed timeout to survive a server restart.

Tests

  • Unit Test
  • Logic Test
  • Benchmark Test
  • No Test - Explain why

Type of change

  • Refactoring

Related Issues


This change is Reviewable

@github-actions github-actions bot added the pr-refactor this PR changes the code base without new features or bugfix label Oct 30, 2024
@drmingdrmer drmingdrmer marked this pull request as ready for review October 30, 2024 12:23
…o restarted server

Before c44ea20, MetaGrpcClient just
auto reconnect if the target meta-service server is restarted.

After c44ea20, the client behavior
changed, if no timeout is set, the client reconnect to the restarted
server but it hangs forever.

In this commit, in the test: test_kv_api_restart_cluster_token_expired,
give the client a fixed timeout to survive a server restart.

- Fix: databendlabs#16704 (comment)
@drmingdrmer drmingdrmer force-pushed the 163-fix-client-survive-closed-server branch from a7e250f to 4246e15 Compare October 30, 2024 12:48
@drmingdrmer drmingdrmer merged commit 0bd9509 into databendlabs:main Oct 30, 2024
72 of 73 checks passed
@drmingdrmer drmingdrmer deleted the 163-fix-client-survive-closed-server branch October 30, 2024 14:06
@Xuanwo
Copy link
Member

Xuanwo commented Oct 30, 2024

Really good fix. Thank you @drmingdrmer for helping addressing this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-refactor this PR changes the code base without new features or bugfix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants