- Merge request !3Issue #3192255: Wrong memory percentage on /admin/reports/redis → (Merged) created by jungle
- 🇦🇺Australia thomwilhelm Sydney
+1, just adding a patch here for people using composer patches.
Hopefully this can get merged!
- 🇬🇧United Kingdom Alina Basarabeanu
Patch from #10 fixed the issue in Drupal Version 9.5.10 and redis 1.7.0.
Can this be merged into the next stable release?
Thank you - 🇳🇱Netherlands Dobefu
I feel like this solution is not very future-proof, as it casts any data type to an integer. This would mean that the percentage would also break in the event that you set the max memory to 1GB and the amount used is in MBs. I feel like the solution would be to first parse the values to their count in bytes.
- 🇦🇺Australia thomwilhelm Sydney
Hi @Dobefu the module was already performing this cast so it wouldn't break anything, see the diff. It's just correcting a math error in the original design.
Other cases not handled can be tackled in follow up issues.
- 🇳🇱Netherlands Dobefu
That's probably fair. I do feel like the cast shouldn't happen, but I agree that this isn't the issue to be discussing that
- Status changed to Needs work
4 months ago 7:52pm 16 August 2024 - 🇨🇭Switzerland berdir Switzerland
the cast is applied to the result of the divide, to avoid displaying a float, it's basically a round().
However, the MR doesn't apply anymore.
- Status changed to Fixed
4 months ago 9:56pm 17 August 2024 - 🇨🇭Switzerland berdir Switzerland
Rebased and added new test coverage for the status report page, including the percentage and also discovered a bug in another recently committed issue that I had to revert.
Merged.
Automatically closed - issue fixed for 2 weeks with no activity.