Uploaded image for project: 'Percona Server for MySQL'
  1. Percona Server for MySQL
  2. PS-4532

Replace obsolete HAVE_purify with HAVE_VALGRIND in ha_rocksdb.cc

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Done
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: 5.7.23-23, 8.0.12-2rc1, Not 5.5.x, Not 5.6.x
    • Fix Version/s: 5.7.24-26, 8.0.13-3
    • Component/s: MyRocks

      Description

      ha_rocksdb.cc has the following code in rocksdb_done_func():

      // This results in memory leaks but it improved the shutdown time.
      // Don't disown when running under valgrind
      #ifndef HAVE_purify
        if (rocksdb_tbl_options->block_cache) {
          rocksdb_tbl_options->block_cache->DisownData();
        }
      #endif /* HAVE_purify */
      

      HAVE_purify is obsolete in 5.7. Facebook MySQL defines it when the server is built with -DWITH_VALGRIND. Percona Server doesn't do that and doesn't use HAVE_purify in any other code.

      I have some concerns about the actual code inside the #ifded, but they should probably go to Facebook. This is merely a request to fix it to work as intended.

        Smart Checklist

          Attachments

            Activity

              People

              Assignee:
              george.lorch George Lorch
              Reporter:
              akopytov Alexey Kopytov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - Not Specified
                  Not Specified
                  Logged:
                  Time Spent - 1 hour, 30 minutes
                  1h 30m