-
Notifications
You must be signed in to change notification settings - Fork 60
TNTP-3334: IPROTO_IS_SYNC support for begin/commit #447
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
base: master
Are you sure you want to change the base?
Conversation
ee93a3e
to
513ae48
Compare
NB: all deleted tests were checking that functions passed from constructor object to fillXXX function were passed in right order, so removing them is not a problem
5f1d4dc
to
4357337
Compare
4357337
to
c74d03f
Compare
->
|
5bb8713
to
8892063
Compare
Part of #TNTP-3334 Closes #366
8892063
to
f8f4d2d
Compare
conn := exampleConnect(dialer, opts) | ||
defer conn.Close() | ||
|
||
// Tarantool supports IS_SYNC flag for BeginRequest since version 3.1.0 |
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.
A comment should end with a dot.
// Tarantool supports IS_SYNC flag for BeginRequest since version 3.1.0 | |
// Tarantool supports IS_SYNC flag for BeginRequest since version 3.1.0. |
conn := exampleConnect(dialer, opts) | ||
defer conn.Close() | ||
|
||
// Tarantool supports IS_SYNC flag for CommitRequest since version 3.1.0q |
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.
// Tarantool supports IS_SYNC flag for CommitRequest since version 3.1.0q | |
// Tarantool supports IS_SYNC flag for CommitRequest since version 3.1.0. |
return | ||
} | ||
|
||
// Begin transaction |
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.
// Begin transaction | |
// Begin transaction. |
return | ||
} | ||
|
||
// Insert in stream |
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.
// Insert in stream | |
// Insert in stream. |
return | ||
} | ||
|
||
// Commit transaction in sync mode |
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.
// Commit transaction in sync mode | |
// Commit transaction in sync mode. |
baseRequest | ||
txnIsolation TxnIsolationLevel | ||
timeout time.Duration | ||
isSync *bool |
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.
Let's avoud a pointer here.
isSync *bool | |
isSync bool | |
isSyncExist bool |
@@ -137,6 +152,8 @@ func (req *BeginRequest) Context(ctx context.Context) *BeginRequest { | |||
// Commit request can not be processed out of stream. | |||
type CommitRequest struct { | |||
baseRequest | |||
|
|||
isSync *bool |
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.
The same.
Implement
BeginRequest.IsSync(bool)
andCommitRequest.IsSync(bool)
.Refactor
Body
methods of all Requests, do not usefillXXX
functions.Part of TNTP-3334
Closes #366