Uploaded image for project: 'Ignite'
  1. Ignite
  2. IGNITE-8550

CacheAbstractJdbcStore expects merge to always return 1 but MySQL may also return 2 or 0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Patch Available
    • Minor
    • Resolution: Unresolved
    • None
    • None
    • cache

    Description

      CacheAbstractJdbcStore.write attempts to execute a merge update if it is available, and expects the merge to always return 1 (as the number of updated entries is always 1).

      However, MySQL's `INSERT ... ON DUPLICATE KEY UPDATE` (https://dev.mysql.com/doc/refman/8.0/en/insert-on-duplicate.html) may return 0 or 2, depending on what was updated:

      With ON DUPLICATE KEY UPDATE, the affected-rows value per row is 1 if the row is inserted as a new row, 2 if an existing row is updated, and 0 if an existing row is set to its current values.

      Because of that, CacheAbstractJdbcStore may report a false warning.

      Need to consider either removing the warning or special-case the MySQL dialect to allow to return values other than 1.

      Attachments

        Activity

          People

            kazakov Ilya Kazakov
            slukyanov Stanislav Lukyanov
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0h
                0h
                Logged:
                Time Spent - 40m
                40m