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

v3: preserve trailing comments #1692

Merged
merged 2 commits into from May 12, 2016
Merged

v3: preserve trailing comments #1692

merged 2 commits into from May 12, 2016

Conversation

sougou
Copy link
Contributor

@sougou sougou commented May 11, 2016

@enisoc
Trailing comments are often used as additional annotation
for queries, especially DML. To support this, Vitess preserves
trailing comments. V3 was not doing this. This change fixes
the behavior.

Implementation: The trailing comments have to be first removed
to allow for the query to match the plan cache. The comments
are then re-added just before routing. This is done for every
query.

Vindex operations are considered to be internal. So, the comments
are not propagated into those.


This change is Reviewable

Trailing comments are often used as additional annotation
for queries, especially DML. To support this, Vitess preserves
trailing comments. V3 was not doing this. This change fixes
the behavior.

Implementation: The trailing comments have to be first removed
to allow for the query to match the plan cache. The comments
are then re-added just before routing. This is done for every
query.

Vindex operations are considered to be internal. So, the comments
are not propagated into those.
@enisoc
Copy link
Member

enisoc commented May 11, 2016

:lgtm:

Previously, sougou wrote…

v3: preserve trailing comments

@enisoc

Trailing comments are often used as additional annotation

for queries, especially DML. To support this, Vitess preserves

trailing comments. V3 was not doing this. This change fixes

the behavior.

Implementation: The trailing comments have to be first removed

to allow for the query to match the plan cache. The comments

are then re-added just before routing. This is done for every

query.

Vindex operations are considered to be internal. So, the comments

are not propagated into those.


Reviewed 10 of 10 files at r1.
Review status: all files reviewed at latest revision, all discussions resolved, some commit checks failed.


Comments from Reviewable

Approved with PullApprove

@sougou sougou merged commit 815cd40 into vitessio:master May 12, 2016
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.

None yet

3 participants