-
Notifications
You must be signed in to change notification settings - Fork 95
LogicalTransactions in frontend Client #317
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
niclaflamme
wants to merge
25
commits into
main
Choose a base branch
from
nic/logical_transation_client
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from 10 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
c3c0039
wip
niclaflamme ed0c361
wip
niclaflamme 1a4c8e8
wip
niclaflamme 84af9e8
wip, test fixes
niclaflamme 77feddd
wip-try-split-command
niclaflamme 956a0cb
testing
niclaflamme 82c89ef
test_fix_maybe
niclaflamme 78a3611
fix_unit_tests
niclaflamme 2f3ebf6
fix test
niclaflamme bbc286b
wip
niclaflamme 6f88b42
wip
niclaflamme 4b4d0d9
wip
niclaflamme 08fcb59
remove-comment
niclaflamme 33f1ec5
wip
niclaflamme f57baa7
wip
niclaflamme 3349342
remove_unused_function
niclaflamme 90b8ba9
checkpoint
niclaflamme b15c058
checkpoint
niclaflamme 374107f
wip
niclaflamme 457abaf
wip
niclaflamme b06fe28
checkpoint
niclaflamme c0528d3
wip
niclaflamme a3f6d46
wip
niclaflamme 9f5c10f
wip
niclaflamme b8f5fe6
wip
niclaflamme File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,8 +6,9 @@ use crate::{ | |
Error as BackendError, | ||
}, | ||
frontend::{ | ||
buffer::BufferedQuery, router::Error as RouterError, Buffer, Command, Comms, | ||
PreparedStatements, Router, RouterContext, Stats, | ||
buffer::BufferedQuery, logical_transaction::LogicalTransaction, | ||
router::Error as RouterError, Buffer, Command, Comms, PreparedStatements, Router, | ||
RouterContext, Stats, | ||
}, | ||
net::Parameters, | ||
state::State, | ||
|
@@ -58,7 +59,7 @@ impl Inner { | |
buffer: &mut Buffer, | ||
prepared_statements: &mut PreparedStatements, | ||
params: &Parameters, | ||
in_transaction: bool, | ||
logical_transaction: &LogicalTransaction, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this is the root change, followed the compiler from here basically. |
||
) -> Result<Option<&Command>, RouterError> { | ||
let command = self | ||
.backend | ||
|
@@ -67,11 +68,11 @@ impl Inner { | |
.map(|cluster| { | ||
// Build router context. | ||
let context = RouterContext::new( | ||
buffer, // Query and parameters. | ||
cluster, // Cluster configuration. | ||
prepared_statements, // Prepared statements. | ||
params, // Client connection parameters. | ||
in_transaction, // Client in explcitely started transaction. | ||
buffer, // Query and parameters. | ||
cluster, // Cluster configuration. | ||
prepared_statements, // Prepared statements. | ||
params, // Client connection parameters. | ||
logical_transaction.in_transaction(), // Client in explcitely started transaction. | ||
)?; | ||
self.router.query(context) | ||
}) | ||
|
Oops, something went wrong.
Oops, something went wrong.
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.
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.
docker-compose
is deprecated.docker compose
has replaced it.docker-compose
does not work on my recent version ofdocker
desktop.docker compose
works on the version of docker in our CI.win-win?
I suppose it will work for a every engineer's machine too. Can rollback this change if that is not the case