-
Notifications
You must be signed in to change notification settings - Fork 227
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
Allow setting session id of KVTxn #1270
Conversation
Signed-off-by: ekexium <[email protected]>
Signed-off-by: ekexium <[email protected]>
@@ -395,6 +395,22 @@ func (txn *KVTxn) SetTxnSource(txnSource uint64) { | |||
txn.txnSource = txnSource | |||
} | |||
|
|||
// SetSessionID sets the session ID of the transaction. | |||
// If the committer is not initialized yet, the function won't take effect. |
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.
For the concern of completeness of the API, do we consider put it to another field temporarily if the committer is not initialized yet, and use it lazily when initializing the committer?
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 worth consideration. But I don't want to do it now as it's not needed
#908 Can this PR help? |
Signed-off-by: ekexium <[email protected]>
Yes. I tried to use ctx logger when possible. But it's not always feasible so SetSessionID is still needed for those cases. |
Self-explained by the comment.