[17.0][IMP] fs_storage: invalidate orm cache when connection fails#384
[17.0][IMP] fs_storage: invalidate orm cache when connection fails#384
Conversation
|
Thank you @Algosse for all your hard work. I don't work with Odoo version 17. It is therefore difficult for me to give an in-depth review of the proposed changes. I will try to take the time to install a version 17 and understand the problem you are experiencing. |
…r non admin users
|
@Algosse Is your fix still required with the last changes on 16.0? |
|
Hello Guys, Thanks for the forward of V16! Sorry for the delay, I did not find the time to properly check and run the changes. I'm not sure the forward will solve my issue. In my previous tests, I figured the problem was the ormcache of the get_fs_by_code method If the connection fails, the method keeps returning the same faulty fs. It does not access the fs property so it does not triger the check_connection method. I don't have the time to look at it now, I will be able in a few weeks. If someone wants to try, the "best" way I found to crash the connection was to use a fs_storage with SFTP protocol, linked it to a model (for example sale.order) and drag & drop multiple files at once in the chatter (I think Odoo tries to upload files in parallel and fsspec does not like it, at least for SFTP). |
|
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. |
|
@Algosse what is the state of this issue for you? I am facing the same problem. SFTP Connections fail after multiple files. |
Fixes #374
I adapted a some parts of the code related to _check_connection from V16.0 (started in #320) and implemented it in V17.0.
Also, I added a check_connection everytime the fs is accessed to detected if it should be generated again or not.