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

tests: deflake migrater #5620

Merged
merged 1 commit into from
Dec 23, 2019
Merged

Conversation

sougou
Copy link
Contributor

@sougou sougou commented Dec 23, 2019

Fixes #5616
After tablets are initialized, the shard master gets updated
asynchronoysly. Sometimes, the test races ahead of that update and
panics.

Test is now changed to wait for shard masters to be udpated, and
there's no defensive code in case the master is not set.

Signed-off-by: Sugu Sougoumarane ssougou@gmail.com

Fixes vitessio#5616
After tablets are initialized, the shard master gets updated
asynchronoysly. Sometimes, the test races ahead of that update and
panics.

Test is now changed to wait for shard masters to be udpated, and
there's no defensive code in case the master is not set.

Signed-off-by: Sugu Sougoumarane <ssougou@gmail.com>
@sougou sougou requested review from deepthi and morgo December 23, 2019 20:24
@sougou sougou merged commit 484003c into vitessio:master Dec 23, 2019
@sougou sougou deleted the ss-deflake-migrater branch December 23, 2019 21:05
systay pushed a commit that referenced this pull request Jul 22, 2024
* Allow for more flexible parsing

`VECTOR` should not be treated as a keyword, because MySQL also still
allows it being used as a column name for example in MYSQL 9.0.0 which
adds the `VECTOR` type.

This doesn't work yet though, it triggers a whole bunch of additional
shift/reduce and reduce/reduce warnings:

conflicts: 6 shift/reduce, 41 reduce/reduce

I have tried many things to resolve this one, but failed so far. One
thing that removes the reduce/reduce conflicts is to change the `ALTER
TABLE` style syntax to:

```
| VECTOR index_or_key name_opt
```

This means thought that in `ALTER TABLE ... ADD VECTOR INDEX|KEY` the
later `INDEX` or `KEY` part is required which doesn't match MySQL for
`SPATIAL` and `FULLTEXT` (it's optional there).

Like I semantically understand why these conflicts happen, but I'm
failing to tell the grammar properly how to resolve them explicitly.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* feat: fix shift-reduce conflict

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: handle reduce reduce conflicts by unrolling the grammar symbol and adding precedence rules

Signed-off-by: Manan Gupta <manan@planetscale.com>

* feat: account for a newline being removed in sql.y 🤦

Signed-off-by: Manan Gupta <manan@planetscale.com>

* Make index or key non-optional

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

* Reduce upstream diff

Makes it easier to avoid conflicts in the future.

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>

---------

Signed-off-by: Dirkjan Bussink <d.bussink@gmail.com>
Signed-off-by: Manan Gupta <manan@planetscale.com>
Co-authored-by: Manan Gupta <manan@planetscale.com>
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.

wrangler flaky test: migrater
2 participants