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

Delete discovery gateway #9500

Merged
merged 12 commits into from
Mar 10, 2022
Merged

Conversation

systay
Copy link
Collaborator

@systay systay commented Jan 11, 2022

Description

This pull request removes the DiscoveryGateway struct and related files. The DiscoveryGateway has been our legacy gateway since the implementation of the new tabletgateway through #6155.

Related Issue(s)

Checklist

  • Should this PR be backported? NO
  • Tests were added or are not required
  • Documentation was added or is not required

Comment on lines 459 to 461
_ = hc.AddTestTablet(cell, "e0-", 1, "TestExecutor", "e0-", topodatapb.TabletType_PRIMARY, true, 1, nil)
// Below is needed so that SendAnyWherePlan doesn't fail
_ = hc.AddTestTablet(cell, "e0-", 1, "TestXBadVSchema", "-20", topodatapb.TabletType_PRIMARY, true, 1, nil)
Copy link
Member

Choose a reason for hiding this comment

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

the problem seems to be related to hostname, if you change the hostname from e0- to random the test starts working.
The bug may be a test thing when the hostname is the same.

Copy link
Member

@deepthi deepthi Jan 11, 2022

Choose a reason for hiding this comment

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

ah good point. we should change e0- to -20 to match the shard name and make it unique.

Copy link
Member

Choose a reason for hiding this comment

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

-20 also conflicts. I guess we should make it 0.
I tried that, the next error is

--- FAIL: TestExecutorMaxPayloadSizeExceeded (0.00s)
    executor_test.go:1992:
        	Error Trace:	executor_test.go:1992
        	Error:      	Not equal:
        	            	expected: <nil>(<nil>)
        	            	actual  : *vterrors.fundamental(Code: NOT_FOUND
        	            	tablet aa-0000000010 not found
        	            	)
        	Test:       	TestExecutorMaxPayloadSizeExceeded
        	Messages:   	err should be nil

@@ -409,7 +409,7 @@ func TestDeleteEqual(t *testing.T) {
}

func TestUpdateScatter(t *testing.T) {
Copy link
Member

Choose a reason for hiding this comment

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

for failing test, the issue is due to a global session named primarySession getting used.
instead create a local session for those tests and use exec or executorExecSession instead of executorExec

Copy link
Member

Choose a reason for hiding this comment

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

What I did instead is to not initialize primarySession when it is declared, but create it in each of the test env functions - createExecutorEnv etc. That seems to fix all the failures in this particular test.

@systay
Copy link
Collaborator Author

systay commented Jan 18, 2022

let's re-open when we have time to spend on it

@systay systay closed this Jan 18, 2022
@systay systay reopened this Jan 18, 2022
Signed-off-by: deepthi <deepthi@planetscale.com>
Signed-off-by: deepthi <deepthi@planetscale.com>
… package

Signed-off-by: deepthi <deepthi@planetscale.com>
@frouioui frouioui self-assigned this Mar 3, 2022
…teway

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
…t names

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@frouioui frouioui changed the title delete discoverygateway Delete discovery gateway Mar 9, 2022
Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@frouioui frouioui marked this pull request as ready for review March 9, 2022 09:54
@frouioui frouioui self-requested a review as a code owner March 9, 2022 09:54
@frouioui
Copy link
Member

frouioui commented Mar 9, 2022

I will open a follow-up pull request rebased on top of this one to remove the Gateway interface introduced by #5992.

…TabletUID

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
Copy link
Collaborator Author

@systay systay left a comment

Choose a reason for hiding this comment

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

I opened this PR, so I can't accept it, but it LGTM ⭐

Removing old code is the best ❤️

…teway

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@frouioui
Copy link
Member

frouioui commented Mar 9, 2022

@deepthi in healthcheck.go you left a ToDo to deprecate some variables. I am not sure which ones you were talking about. Can you guide me?

Link to the corresponding ToDo:
https://cs.github.com/vitessio/vitess/blob/605beab9015ce69840f014cabd98a8ecae4d9b31/go/vt/discovery/healthcheck.go#L70

@frouioui frouioui mentioned this pull request Mar 9, 2022
3 tasks
@deepthi
Copy link
Member

deepthi commented Mar 9, 2022

@deepthi in healthcheck.go you left a ToDo to deprecate some variables. I am not sure which ones you were talking about. Can you guide me?

Link to the corresponding ToDo: https://cs.github.com/vitessio/vitess/blob/605beab9015ce69840f014cabd98a8ecae4d9b31/go/vt/discovery/healthcheck.go#L70

Not deprecate, just change from exported -> not. All 6 flags below that comment should be reviewed to see if they are still being used outside discovery package. If not, we can change them back.

Signed-off-by: Florent Poinsard <florent.poinsard@outlook.fr>
@systay systay requested a review from ajm188 as a code owner March 10, 2022 07:08
@frouioui frouioui merged commit 4162b2f into vitessio:main Mar 10, 2022
@frouioui frouioui deleted the delete-discovery-gateway branch March 10, 2022 14:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants