-
Notifications
You must be signed in to change notification settings - Fork 1.9k
refactor: relax the signature of register_* in SessionContext #4612
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
Conversation
Signed-off-by: Ruihang Xia <waynestxia@gmail.com>
|
I wonder if perhaps this is a sign that we don't really need these locks 🤔 will have a play around |
alamb
left a comment
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.
Looks good to me 👍
IMO that lock cannot be avoided. If we don't put it over |
|
Benchmark runs are scheduled for baseline = 4542031 and contender = da0de9d. da0de9d is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
|
Thanks for that info! |
|
I remember when I refactor the original ExecutionContext to SessionContext, I also thought the signature of the |
Signed-off-by: Ruihang Xia waynestxia@gmail.com
Which issue does this PR close?
NAN
Rationale for this change
Change the API for
register_*(likeregister_udf) inSessionContext. Relax the share requirement from&mut selfto&self. Because the actual state is wrapped in aRwLock(state: Arc<RwLock<SessionState>>), it's unnecessary to require&mut selfforSessionContextitself.What changes are included in this PR?
Relax the share requirement from
&mut selfto&self.Are these changes tested?
No need I suppose.
Are there any user-facing changes?
Yes, this is API change.