Don't rebuild HTTP session with no connections#1020
Don't rebuild HTTP session with no connections#1020martindurant wants to merge 1 commit intofsspec:mainfrom
Conversation
|
@Koncopd , latest aiobotocore doesn't like that; but I'm not sure why we are getting an unstarted session the second time around. |
|
Given that there isn't much cost to "rebuilding" the http_sessions without any actual live sessions, and that it only happens once, I think it's not worth trying to prob aiobotocore in the right direction here. What do you think, @Koncopd ? |
|
As I said, my problem is that rebuilding aiobotocore session (not http sessions) erases the credentials I pass. And if I provide a session, it should not happen that I just lose it on set_session. |
|
Here I mean Line 643 in 731e125 |
|
Btw the failing test (test_session_close) looks strange to me, it runs |
Yes, that is exactly the idea. If I remember, the variable is there to allow a breakpoint in the function, where we know which invocation we are on. |
|
Thank you, i will try to check the problem later. |
|
Hi — came at this from a perf regression we hit downstream (one of our test suites went from 49s to 173s on s3fs 2026.4.0). I put together a small repro that walks through the states the cached-session check can end up in, in case it's useful: https://github.com/lukedyer-uipath/s3fs-pr1002-repro I worked through the diagnosis and built the linked repro with help from Claude Code, so any of the claims below are worth a sanity check before acting on — flagging that up front. I might be misreading some of this, so please correct me, but it looks like there are a couple of states beyond the empty-dict case from #1019 that this PR's
Closed inner sessions with I don't have a confident view on the right shape of the fix — For what it's worth, we've sidestepped this downstream by replacing aiomoto with |
Fixes #1019