Skip to content
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

nexus: reduce use of Arc where unnecessary #827

Merged
merged 2 commits into from
Dec 15, 2023
Merged

nexus: reduce use of Arc where unnecessary #827

merged 2 commits into from
Dec 15, 2023

Conversation

serprex
Copy link
Contributor

@serprex serprex commented Dec 14, 2023

Also have CatalogConfig borrow since args live for program's entire lifecycle

get_executor now uses entry which isn't a clear win, as the API forces a clone on peer.name & takes a write lock, but now there's no race where two concurrent calls to get_executor create two separate connections

A follow up would be to have Peer include id (maybe out of band, because protobufs), allowing many of these hashmaps to be keyed on id. That'd also avoid cache invalidation in the future if ALTER PEER old RENAME TO new were implemented

Also properly escape string with single quote in NexusBackend::parameter_to_string

@serprex serprex requested a review from iskakaushik December 14, 2023 22:31
@serprex serprex enabled auto-merge (squash) December 14, 2023 22:32
@serprex serprex force-pushed the less-arc branch 2 times, most recently from db05958 to 96a5c2a Compare December 14, 2023 22:47
Also have CatalogConfig borrow since args live for program's entire lifecycle

get_executor now uses `entry` which isn't a clear win,
as the API forces a clone on peer.name & takes a write lock,
but now there's no race where two concurrent calls to get_executor
create two separate connections

A follow up would be to have Peer include id (maybe out of band, because protobufs),
allowing many of these hashmaps to be keyed on id. That'd also avoid cache invalidation in the future if
`ALTER PEER old RENAME TO new` were implemented

Also properly escape string with single quote in `NexusBackend::parameter_to_string`
@serprex serprex merged commit e810be4 into main Dec 15, 2023
12 checks passed
@serprex serprex deleted the less-arc branch December 19, 2023 16:36
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.

2 participants