refactor: relax the signature of register_* in SessionContext#4612
refactor: relax the signature of register_* in SessionContext#4612alamb merged 1 commit intoapache:masterfrom
Conversation
Signed-off-by: Ruihang Xia <[email protected]>
|
I wonder if perhaps this is a sign that we don't really need these locks 🤔 will have a play around |
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 [email protected]
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.