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

docs: RFC for better staleness read syntax. #22506

Closed
wants to merge 1 commit into from
Closed

docs: RFC for better staleness read syntax. #22506

wants to merge 1 commit into from

Conversation

sunxiaoguang
Copy link
Contributor

@sunxiaoguang sunxiaoguang commented Jan 24, 2021

Signed-off-by: Xiaoguang Sun sunxiaoguang@zhihu.com

What problem does this PR solve?

Issue Number: 22505

Problem Summary:
Existing timestamp bound read SQL syntax is over complicate and hard to use

What is changed and how it works?

Propose new syntax to staleness read and deprecates existing timestamp bounds read SQL syntax which is over complicate.

What's Changed:

RFC documents.

Check List

Tests

  • No code

Release note

  • No release note

Signed-off-by: Xiaoguang Sun <sunxiaoguang@zhihu.com>
@sre-bot
Copy link
Contributor

sre-bot commented Jan 24, 2021

Please follow PR Title Format:

  • pkg [, pkg2, pkg3]: what's changed

Or if the count of mainly changed packages are more than 3, use

  • *: what's changed

@sre-bot
Copy link
Contributor

sre-bot commented Jan 24, 2021

@sunxiaoguang sunxiaoguang changed the title RFC for better staleness read syntax. docs: RFC for better staleness read syntax. Jan 24, 2021
@sunxiaoguang
Copy link
Contributor Author

/rebuild

@siddontang
Copy link
Member

siddontang commented Jan 25, 2021

I think we can support the simple syntax, meanwhile, we can also support the full syntax. like start transaction read only with timestamp = xxx

@siddontang
Copy link
Member

PTAL @morgo

@morgo
Copy link
Contributor

morgo commented Jan 25, 2021

Time travel queries are not part of MySQL, but they are part of MariaDB and the SQL:2011 standard. The syntax is in this FR: #18672

I don't believe either specify syntax that is transaction scoped, but I can see this can be useful.

@sunxiaoguang
Copy link
Contributor Author

Time travel queries are not part of MySQL, but they are part of MariaDB and the SQL:2011 standard. The syntax is in this FR: #18672

I don't believe either specify syntax that is transaction scoped, but I can see this can be useful.

There are two statements related to staleness read, the last statement is time travel read. A unified syntax for both cases would be nice.

START TRANSACTION READ ONLY WITH TIMESTAMP BOUND READ TIMESTAMP '2019-11-04 00:00:00'
```

The redundant words ```READ ONLY``` and ```TIMESTAMP BOUND``` as well as ```READ``` are removed for clarity.
Copy link
Member

Choose a reason for hiding this comment

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

I think READ ONLY warnings the txn must be a read-only transaction, rather than the user may do write operator in the transaction.

@siddontang
Copy link
Member

Refer to #18672

@sunxiaoguang maybe we can use AS OF instead of WITH?

@sunxiaoguang
Copy link
Contributor Author

Refer to #18672

@sunxiaoguang maybe we can use AS OF instead of WITH?

Refer to #18672

@sunxiaoguang maybe we can use AS OF instead of WITH?

I'm not sure, maybe AS OF usually comes with a particular point of time but not bounds?

@nolouch
Copy link
Member

nolouch commented Mar 4, 2021

How about discussing more at #22765?

@nolouch
Copy link
Member

nolouch commented Apr 26, 2021

We have a conclusion: #22765 (comment)
cc @sunxiaoguang

@sunxiaoguang
Copy link
Contributor Author

We have a conclusion: #22765 (comment)
cc @sunxiaoguang

Great. Since the detail discussion is not here, maybe we should close this issue for now. What do you think @nolouch?

@nolouch
Copy link
Member

nolouch commented May 6, 2021

Yes, I closed #22505, and I will update the RFC document in another PR.

@tisonkun
Copy link
Contributor

Closed as resolved in #22765

@tisonkun tisonkun closed this Jul 14, 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
Development

Successfully merging this pull request may close these issues.

6 participants