Skip to content

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

bigbes
Copy link

@bigbes bigbes commented Jun 27, 2025

Implement BeginRequest.IsSync(bool) and CommitRequest.IsSync(bool).

Refactor Body methods of all Requests, do not use fillXXX functions.

Part of TNTP-3334
Closes #366

@bigbes bigbes force-pushed the bigbes/TNTP-3334-iproto-is-sync-support branch 2 times, most recently from ee93a3e to 513ae48 Compare June 27, 2025 16:35
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
@bigbes bigbes force-pushed the bigbes/TNTP-3334-iproto-is-sync-support branch 3 times, most recently from 5f1d4dc to 4357337 Compare June 30, 2025 14:57
@bigbes bigbes requested review from dmyger and oleg-jukovec June 30, 2025 14:58
@bigbes bigbes marked this pull request as ready for review June 30, 2025 15:00
@bigbes bigbes force-pushed the bigbes/TNTP-3334-iproto-is-sync-support branch from 4357337 to c74d03f Compare June 30, 2025 15:03
@oleg-jukovec
Copy link
Collaborator

Closes #TNTP-3334

->

Part of #TNTP-3334

@bigbes bigbes force-pushed the bigbes/TNTP-3334-iproto-is-sync-support branch 2 times, most recently from 5bb8713 to 8892063 Compare July 1, 2025 12:52
@bigbes bigbes force-pushed the bigbes/TNTP-3334-iproto-is-sync-support branch from 8892063 to f8f4d2d Compare July 1, 2025 12:55
conn := exampleConnect(dialer, opts)
defer conn.Close()

// Tarantool supports IS_SYNC flag for BeginRequest since version 3.1.0
Copy link
Collaborator

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.

Suggested change
// 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// 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
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Begin transaction
// Begin transaction.

return
}

// Insert in stream
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Insert in stream
// Insert in stream.

return
}

// Commit transaction in sync mode
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
// Commit transaction in sync mode
// Commit transaction in sync mode.

baseRequest
txnIsolation TxnIsolationLevel
timeout time.Duration
isSync *bool
Copy link
Collaborator

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.

Suggested change
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
Copy link
Collaborator

Choose a reason for hiding this comment

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

The same.

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.

Support IPROTO_IS_SYNC
2 participants