Storage space info creation timestamp must not be overwritten during UPDATE queries

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: Major
    • 1.11.22
    • Affects Version/s: 1.11.21
    • Component/s: backend
    • Security Level: Public (Visbile by non-authn users.)
    • None

      Updates to storage space info table are done with queries that involve also the CREATED field which shouldn't involved. This generates some not consistent values stored on database. For example, after a bootstrap with an empty table, this is the status of the table:

      MariaDB [storm_be_ISAM]> select CREATED from storage_space;
      +---------------------+
      | CREATED             |
      +---------------------+
      | 2022-01-13 18:10:05 |
      | 2022-01-13 19:10:05 |
      | 2022-01-13 18:10:05 |
      | 2022-01-13 18:10:05 |
      | 2022-01-13 19:10:05 |
      | 2022-01-13 19:10:05 |
      | 2022-01-13 18:10:05 |
      +---------------------+
      

      This probably happens because records are created at boot and as soon as the first round of du gets its results, the records are updated involving the CREATED field. Try to fix this removing CREATED from the UPDATE query.

            Assignee:
            Enrico Vianello
            Reporter:
            Enrico Vianello
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: