-
Notifications
You must be signed in to change notification settings - Fork 259
Reduce message cloning operations #190
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
zainkabani
wants to merge
41
commits into
postgresml:main
Choose a base branch
from
zainkabani:zain/reduce-cloning-operations
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 all commits
Commits
Show all changes
41 commits
Select commit
Hold shift + click to select a range
d7bf2de
initial commit
zainkabani b42c33c
fix typo
zainkabani 3ae2953
use cursor for parse params instead of bytesmut
zainkabani 33a0cad
undo
zainkabani 65bd10d
Update to use a dedicated server message buffer
zainkabani 09db31d
fmt
zainkabani 8b47f32
Read message directly onto buffer instead of new bytesmut
zainkabani d6c8271
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani 1589548
remove commented code
zainkabani e2b2cb0
Move server buffer to server object
zainkabani 8d68d22
Move client and server message buffers to attribute of object
zainkabani f019e28
Remove clear buffer function since public already
zainkabani 4cb38b8
Remove commented code
zainkabani 8f3fc25
Remove cloning operation for query router
zainkabani 728f6cf
Rename server and client buffers to buffer
zainkabani ee19dbc
Fix bug
zainkabani 027011d
Rename read_messages to read_messages_into_buffer
zainkabani f0ceb8b
fmt
zainkabani 021a108
Rename to message_buffer to be more explicit
zainkabani 24d36af
Read message body directly onto buffer
zainkabani 8a58f8b
Fix bug
zainkabani 089348b
fmt
zainkabani ecb9627
Unused try_into
zainkabani a3e3801
use read_exact instead of read to guarantee number of bytes read
zainkabani bece3b9
Remove length check
zainkabani 54ed58e
fmt
zainkabani ada475e
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani ccde8f0
Add comment to read_string function and uses sizeof for byte lengths …
zainkabani 6c5b5df
fmt
zainkabani 7bf9503
Refactor reading query in infer role
zainkabani 5f8473c
Creates send server message to client function to both send to client…
zainkabani 0fa0214
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani 2986f06
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani 382e0b8
Ensures buffer is cleared before it checked in
zainkabani 459e5d4
revert?
zainkabani ae4078e
try again
zainkabani 08f179c
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani 6ad7564
Merge branch 'main' into zain/reduce-cloning-operations
zainkabani 2a84549
Update comments
zainkabani fb891fc
fmt
zainkabani 9937aba
fix
zainkabani 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
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.
I don't think this changes anything.
resis deallocated at the end of this block anyway, so borrowing it doesn't do anything, you might as well pass ownership towrite_all_half(). Passing ownership != copying.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.
if the function doesn't need the explicit object then it's better to have it accept the reference so it can stay more flexible
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.
Another reason we're using reference here is because we don't want to clone or pass ownership of the buffer to the send operation so we pass a reference instead.