fair-acc / opencmw-cpp

Open Common Middle-Ware library for accelerator equipment- and beam-based control systems at FAIR.
https://opencmw.io
GNU Lesser General Public License v3.0
10 stars 8 forks source link

RestBackend: Do not expire connections that are in use #344

Closed frankosterfeld closed 7 months ago

frankosterfeld commented 8 months ago

Actually update the "lastUsed" timestamp when accessing a cached connection. Otherwise the cache is destroyed and recreated in normal operation, leading to LongPollingIdx=Next requests to fail (as they were redirected to the latest index before cache reset, which is then considered a "future" index, as the latest index is reset to 0).

codecov[bot] commented 8 months ago

Codecov Report

Attention: Patch coverage is 66.66667% with 1 lines in your changes are missing coverage. Please review.

Project coverage is 57.03%. Comparing base (09cc4c9) to head (3bfa375).

:exclamation: Current head 3bfa375 differs from pull request most recent head ccbd978. Consider uploading reports for the commit ccbd978 to get more accurate results

Files Patch % Lines
src/majordomo/include/majordomo/RestBackend.hpp 66.66% 0 Missing and 1 partial :warning:
Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #344 +/- ## ======================================= Coverage 57.02% 57.03% ======================================= Files 69 69 Lines 7360 7361 +1 Branches 2728 2728 ======================================= + Hits 4197 4198 +1 Misses 1325 1325 Partials 1838 1838 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

sonarcloud[bot] commented 8 months ago

Quality Gate Failed Quality Gate failed

Failed conditions
C Maintainability Rating on New Code (required ≥ A)

See analysis details on SonarCloud

Catch issues before they fail your Quality Gate with our IDE extension SonarLint