1. 15 Oct, 2020 1 commit
  2. 11 Oct, 2020 1 commit
  3. 04 Oct, 2020 2 commits
  4. 03 Oct, 2020 3 commits
    • Daniel Vrátil's avatar
    • Daniel Vrátil's avatar
      (De)compress payload data during (de)serialization · 37f9fcae
      Daniel Vrátil authored
      The compression is completely transparent to clients, serializers and
      Akonadi. The idea is that when serializing payload, we can compress
      the serialized data using LZMA compression to save space. The data are
      usually large enough to benefit from the compression and at the same
      time small enough for the compression to not cause any significant
      performance overhead.
      
      In my local experiment, compressing each file in file_db_data reduced
      the overall size by ~30%.
      
      The only place where the compression aspects "leak" to the user is
      regarding the Item and part sizes stored in Akonadi.
      
      The change is backwards compatible, so it can handle uncompressed
      payloads created before this change just fine. All newly created
      or updated payloads will get compressed automatically. Eventually
      a StorageJanitor task to compress th entire storage may be introduced,
      but we may need some proper progress reporting for that, since it
      may take a lot of time, even on fast SSD disk to compress all the
      files in file_db_data (depending on size of the database).
      37f9fcae
    • Daniel Vrátil's avatar
      Implement CompressionStream · 2bf3a5c9
      Daniel Vrátil authored
      It's a QIODevice that can be placed on top of another
      QIODevice. When opened in read-only mode, it will read
      compressed data from the underlying device and output
      decompressed data. When opened in write-only mode it
      will take the data written into it and write them
      compressed into the underlying device.
      2bf3a5c9
  5. 11 Sep, 2020 1 commit
  6. 07 Sep, 2020 1 commit
  7. 05 Sep, 2020 2 commits
  8. 02 Sep, 2020 2 commits
    • Ahmad Samir's avatar
      AgentBase: Fix crash in setOnline · 66d1135d
      Ahmad Samir authored
      When setOnline tries to access the mSettings member after the latter has
      been deleted we get a crash; mSettings is deleted in quit() or cleanup(),
      therefore it looks like a race condition: the Agent is about to quit, but
      some other code calls setOnline leading to a crash. It looks like this can
      happen in more than one way, e.g. via a dbus call (from AgentInstance), or
      via a sub-class of AgentBase calling setOnline directly. Use a bool member
      var, modelled after how AgentInstance uses a similar logic.
      
      BUG: 418844
      (cherry picked from commit 53574eb6)
      66d1135d
    • Ahmad Samir's avatar
      AgentBase: Fix crash in setOnline · 53574eb6
      Ahmad Samir authored
      When setOnline tries to access the mSettings member after the latter has
      been deleted we get a crash; mSettings is deleted in quit() or cleanup(),
      therefore it looks like a race condition: the Agent is about to quit, but
      some other code calls setOnline leading to a crash. It looks like this can
      happen in more than one way, e.g. via a dbus call (from AgentInstance), or
      via a sub-class of AgentBase calling setOnline directly. Use a bool member
      var, modelled after how AgentInstance uses a similar logic.
      
      BUG: 418844
      53574eb6
  9. 01 Sep, 2020 1 commit
  10. 26 Aug, 2020 1 commit
  11. 23 Aug, 2020 1 commit
  12. 19 Aug, 2020 1 commit
  13. 16 Aug, 2020 1 commit
  14. 14 Aug, 2020 2 commits
    • David Faure's avatar
      StandardActionManager: compress updates and emit useful signal · 9eda8853
      David Faure authored
      When deleting 5000 emails, KMail uses 100% CPU for a long time.
      This is because the messagelib code (due to threading etc.) removes
      rows one by one from the model. As a result
      - StandardActionManager was recalculating selection (slowly, see
      safeSelectedRows()) after every item
      - StandardMailActionManager was doing the same again
      - QSortFilterProxyModel updates its internal mapping at every step.
      I can't fix the last one, but I fixed the first two:
      
      1) compress changes with a 0s timer, so we only update the actions
      when going back to the event loop
      2) emit signal for StandardMailActionManager to use the computed
      lists, and more importantly so that it doesn't need its own timer.
      StandardActionManager is now the one which decides when StandardMailActionManager
      should update.
      9eda8853
    • David Faure's avatar
      Repair entitytreemodeltest which requires the itemsFetched private slot. · be65c229
      David Faure authored
      FakeAkonadiServerCommand::connectForwardingSignals() connects to it.
      
      Not fully passing though, but much better than before...
      FAIL!  : EntityTreeModelTest::testInitialFetch() Compared lists differ at index 0.
         Actual   (extractModelColumn(*m_model, parent, topLeft.row(), bottomRight.row())): QVariant(QString,Col 6)
         Expected (expectedSignal.newData): QVariant(QString,Col 2)
         Loc: [akonadi/autotests/libs/modelspy.cpp(84)]
      FAIL!  : EntityTreeModelTest::testInitialFetch() Compared lists differ at index 0.
         Actual   (extractModelColumn(*m_model, parent, topLeft.row(), bottomRight.row())): QVariant(QString,Col 2)
         Expected (expectedSignal.newData): QVariant(QString,Col 7)
         Loc: [akonadi/autotests/libs/modelspy.cpp(84)]
      FAIL!  : EntityTreeModelTest::testInitialFetch() Compared lists differ at index 0.
         Actual   (extractModelColumn(*m_model, parent, topLeft.row(), bottomRight.row())): QVariant(QString,Col 7)
         Expected (expectedSignal.newData): QVariant(QString,Col 6)
         Loc: [akonadi/autotests/libs/modelspy.cpp(84)]
      Seems like an ordering problem...
      be65c229
  15. 13 Aug, 2020 1 commit
  16. 11 Aug, 2020 1 commit
  17. 10 Aug, 2020 1 commit
  18. 07 Aug, 2020 2 commits
  19. 06 Aug, 2020 2 commits
  20. 05 Aug, 2020 3 commits
  21. 03 Aug, 2020 6 commits
    • Antonio Larrosa Jimenez's avatar
    • Antonio Larrosa Jimenez's avatar
    • Antonio Larrosa Jimenez's avatar
    • Antonio Larrosa Jimenez's avatar
      Use nullptr instead of 0L · 01534f7f
      Antonio Larrosa Jimenez authored
      Some habits are hard to break
      01534f7f
    • Antonio Larrosa Jimenez's avatar
      Check availability of Postgresql backend and clean a bit the code · 217fc7bd
      Antonio Larrosa Jimenez authored
      Rename `areRequirementsAvailable` method to `isAvailable` and implement the
      method for DbConfigPostgresql too.
      Extract the code from `DbConfig::configuredDatabase` that selects the fallback
      to use to a new separate static method, `defaultAvailableDatabaseBackend`
      to be more clear about what that code does and simplify `configuredDatabase`.
      
      Now if Postgresql is expected to be used (because akonadi was built like that)
      but QPSQL is not available or the initdb/pg_ctl binaries don't exist, then we
      fallback to trying to use QSQLITE3.
      
      As with the `DbConfigMysql` change, if QSQLITE3 can't be used either, then
      the code will continue trying to use postgresql and fail as expected.
      217fc7bd
    • Antonio Larrosa Jimenez's avatar
      Fallback to using the QSQLITE3 driver if QMYSQL can't be used · 8240e111
      Antonio Larrosa Jimenez authored
      On SUSE Linux Enterprise Desktop (SLED) with the PackageHub repository
      enabled (which provides the KDE packages) the mysql package is not available,
      so there's no mysqld, and the QMYSQL driver can't be used.
      
      OTOH, SUSE Linux Enterprise Server (SLES) with the same PackageHub repository
      enabled has a mariadb package available which provides the mysqld binary.
      
      Since the akonadi-server package for SLES and SLED is the same, we can't
      just set DATABASE_BACKEND to SQLITE at buildtime and we need to choose
      a fallback at runtime, which is what this commit implements.
      
      If it's the first time akonadi starts and mysql is expected to be used, this
      commit checks if it's really usable, and if it's not, it checks if the QSQLITE3 driver
      is available and if it is, we fall back to it instead of using mysql.
      
      Since we need to find out if a DbConfig* object can be initialized before
      it's actually initialized, I added a bool storeSettings parameter to
      DbConfig::init(QSettings &) that can be used to try the initialization
      (find out available paths, etc.) without storing anything.
      
      Then I added two methods DbConfigMysql::areRequirementsAvailable and
      DbConfigSqlite::areRequirementsAvailable that check if the given object
      has the system requirements available. I didn't add it to
      DbConfigPostgresql because Postgresql isn't used by default in any case.
      
      Also, note that this check is only done the first time akonadi starts
      when it's not configured. Once it starts with mysql or sqlite3 this
      configuration is stored and used the next times without any further
      check.
      8240e111
  22. 30 Jul, 2020 1 commit
  23. 27 Jul, 2020 2 commits
  24. 06 Jul, 2020 1 commit