Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
*: Introduce PessimisticRRTxnContextProvider for pessimistic repeatable read txn #35158
*: Introduce PessimisticRRTxnContextProvider for pessimistic repeatable read txn #35158
Changes from 13 commits
26dffbf
c790ce5
f470da4
cbbbfee
de967e6
4553d94
c0294b3
8d21907
514828f
7d82ebc
82dbbda
2861606
9cdfaa4
344ba52
0e9cbaf
ace586f
a2f3d21
7f0f3a0
0a129f9
f2ee63f
248e826
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Try to avoid using
any
type but a concrete type in the interface definition, it would make it difficult to use and maintain.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's hard to construct a concrete type here as the parameters of different advice type differs a lot. Could you give some suggestions?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It depends on the design of what's planned to be passed inside and how the parameters would be used. The most commonly used way is to abstract some
interface
ortrait
to describe the meaning of the input parameters, for example, you could abstract a new type namedTxnAdvice
which contains both advice type and value, or abstract a new interface which defines what should be passed in as theadvice
parameters.The main thing is to answer
what's an advice and how to describe it, what's the design?
, but not just leave something likewhatever type is acceptable, perhaps some will work some would not
especially defining interfaces.In general, don't use the
any
orinteface{}
types it's not maintainable and other people have no idea what should be passed or how to build anotheradvice
type.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where's the logic checking
isBeiginStmt
, the function name is a bit confusing.