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

explain analyze runtime info is zero when using tiflash #52608

Closed
guo-shaoge opened this issue Apr 15, 2024 · 7 comments · Fixed by #52632
Closed

explain analyze runtime info is zero when using tiflash #52608

guo-shaoge opened this issue Apr 15, 2024 · 7 comments · Fixed by #52632
Assignees
Labels

Comments

@guo-shaoge
Copy link
Collaborator

Bug Report

Please answer these questions before submitting your issue. Thanks!

1. Minimal reproduce step (Required)

  1. generate 1000 rows for any table
  2. add tiflash replica
  3. run following sql:explain analyze select * from bc_bet_records_111 limit 1000 offset 1000;

2. What did you expect to see? (Required)

tiflash runtime info should not be zero

3. What did you see instead (Required)

188879bc-99ab-4199-be6d-360b0735d8a4

4. What is your TiDB version? (Required)

MySQL [wetech]> select tidb_version()
    -> ;
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| tidb_version()                                                                                                                                                                                                                                                                        |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Release Version: v8.1.0-alpha-43-g681987317c-dirty
Edition: Community
Git Commit Hash: 681987317c7ae15946b6270e9e8fb1286edadd4f
Git Branch: fix_dml_ru_missing
UTC Build Time: 2024-04-15 08:23:29
GoVersion: go1.21.0
Race Enabled: false
Check Table Before Drop: false
Store: tikv |
+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.009 sec)
@guo-shaoge guo-shaoge added the type/bug This issue is a bug. label Apr 15, 2024
@guo-shaoge
Copy link
Collaborator Author

similar to #50455, but the root cause is different. For this, it's because MPPCoordinatorManager.serverAddr is empty, so tiflash will not report runtime info to tidb.

Because MPPCoordinatorManager.serverAddr is inited when createServer is called, but server.StatusAddr is still empty at that time. The server.StatusAddr is inited inServer.Run(), which is called after createServer

svr := createServer(storage, dom)
exited := make(chan struct{})
signal.SetupSignalHandler(func() {
svr.Close()
cleanup(svr, storage, dom)
cpuprofile.StopCPUProfiler()
resourcemanager.InstanceResourceManager.Stop()
executor.Stop()
close(exited)
})
topsql.SetupTopSQL()
terror.MustNil(svr.Run(dom))

@guo-shaoge guo-shaoge added the sig/execution SIG execution label Apr 15, 2024
@yibin87
Copy link
Contributor

yibin87 commented Apr 15, 2024

/assign @yibin87

@yibin87
Copy link
Contributor

yibin87 commented Apr 15, 2024

Checked v7.5.0, the issue doesn't exist. There seems some changes during v7.5.0 and latest version. Will check it.

@yibin87
Copy link
Contributor

yibin87 commented Apr 16, 2024

In #51472, listenStatusHTTPServer is moved from NewServer to Server.run

@yibin87
Copy link
Contributor

yibin87 commented Apr 16, 2024

/label affects-8.1

@yibin87
Copy link
Contributor

yibin87 commented Apr 16, 2024

/label affects-8.0

Copy link

ti-chi-bot bot commented Apr 16, 2024

@yibin87: The label(s) affects-8.0 cannot be applied. These labels are supported: fuzz/sqlancer, challenge-program, compatibility-breaker, first-time-contributor, contribution, good first issue, correctness, duplicate, proposal, security, ok-to-test, needs-ok-to-test, needs-more-info, needs-cherry-pick-release-5.4, needs-cherry-pick-release-6.1, needs-cherry-pick-release-6.5, needs-cherry-pick-release-7.1, needs-cherry-pick-release-7.5, needs-cherry-pick-release-8.1, affects-5.4, affects-6.1, affects-6.5, affects-7.1, affects-7.5, affects-8.1, may-affects-5.4, may-affects-6.1, may-affects-6.5, may-affects-7.1, may-affects-7.5, may-affects-8.1.

In response to this:

/label affects-8.0

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the ti-community-infra/tichi repository.

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

Successfully merging a pull request may close this issue.

3 participants