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

vttablet: debug/env page to change variables in real-time #7189

Merged
merged 5 commits into from
Dec 29, 2020

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Dec 16, 2020

Backport

NO

Status

READY

Description

Feature implemented as specified in RFC.
Also added links to the new page from /debug/status

Related Issue(s)

Fixes #7171
Fixes #2983

Todos

  • Tests
  • Documentation

Deployment Notes

None

Impacted Areas in Vitess

List general components of the application that this PR will affect:

  • Query Serving
  • VReplication
  • Cluster Management
  • Build

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested a review from rafael December 16, 2020 04:52
@sougou sougou changed the title Ss tb1 env change vttablet: debug/env page to change variables in real-time Dec 16, 2020
Copy link
Member

@rafael rafael left a comment

Choose a reason for hiding this comment

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

@sougou this looks good to me.

Value string
}

func debugEnvHandler(tsv *TabletServer, w http.ResponseWriter, r *http.Request) {
Copy link
Member

Choose a reason for hiding this comment

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

Probably we should reject the request if the method is not POST

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I actually rely on this for my tests, by using GET. Is there a reason to disallow? Also, we seem to be allowing it in other places.

Copy link
Member

Choose a reason for hiding this comment

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

I saw that, If you change this, you will have to update the tests.

I think the reason is general HTTP conventions. In theory, GET requests could be cached and shouldn't mutate state.

I think that ideally, we should stop propagating this pattern. Once people start relying on the get will become even more difficult to change it.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou merged commit 8ea1a8d into vitessio:master Dec 29, 2020
@sougou sougou deleted the ss-tb1-env-change branch December 29, 2020 01:52
@askdba askdba added this to the v9.0 milestone Jan 6, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants