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

support fetch server_info without starting Proxy #330

Merged

Conversation

guo-shaoge
Copy link

@guo-shaoge guo-shaoge commented May 31, 2023

What problem does this PR solve?

Issue Number: close #xxx

Problem Summary:
Related TiFlash issue: pingcap/tiflash#7436 (check TiFlash Issue to for Problem Summary)
Related TiFlash PR: pingcap/tiflash#7577

What is changed and how it works?

Add ffi_server_info_noproxy, which is basically same as ffi_server_info.
The difference is that: ffi_server_info_noproxy doesn't need to start proxy, so this function only need pointer of EngineStoreServerHelper, which will setup in TiFlash Server(which contains the real function to setup PB to tiflash server memory). And no need RaftStoreProxyHelper, which needs to start proxy(proxy_server::run_proxy).

Check List

Tests

  • Unit test
  • Integration test
  • Manual test (add detailed scripts or steps below)
  • No code

Side effects

  • Performance regression: Consumes more CPU
  • Performance regression: Consumes more Memory
  • Breaking backward compatibility

Documentation

  • Affects user behaviors
  • Contains syntax changes
  • Contains variable changes
  • Contains experimental features
  • Changes MySQL compatibility

Release note

None

@guo-shaoge guo-shaoge requested a review from CalvinNeo May 31, 2023 09:45
Signed-off-by: guo-shaoge <[email protected]>
Signed-off-by: guo-shaoge <[email protected]>
@@ -74,3 +77,29 @@ pub extern "C" fn ffi_server_info(
engine_store_ffi::ffi::set_server_info_resp(&resp, res);
0
}

#[no_mangle]
pub extern "C" fn ffi_server_info_noproxy(
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ffi_get_server_info_from_proxy?

Signed-off-by: guo-shaoge <[email protected]>
@guo-shaoge guo-shaoge requested a review from CalvinNeo June 1, 2023 03:09
Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Copy link
Member

@CalvinNeo CalvinNeo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants