MDEV-39708 SBOM contains wrong or missing supplier name for connector-c and libmarias3#5155
MDEV-39708 SBOM contains wrong or missing supplier name for connector-c and libmarias3#5155vaintroub wants to merge 11 commits into
Conversation
…SHOW SLAVE STATUS Changes done to increase MySQL compatibility: - Use SHOW REPLICA STATUS instead of SHOW SLAVE STATUS for retrieving slave status. If this fails with syntax error, retry with SHOW SLAVE STATUS. - If SHOW MASTER FAILS, retry with MySQL 8.4 syntax SHOW BINARY LOG STATUS - Add in MariaDB server SHOW BINARY LOG STATUS as an alias for SHOW MASTER STATUS.
…_find and ut_delay Under high concurrency, MVCC snapshot creation may spend a significant amount of time in lf_hash_iterate()/l_find() while collecting active read-write transaction identifiers. This overhead is particularly visible in sysbench oltp_read_write with transaction-isolation=READ-COMMITTED. Iteration cost becomes high due to significant TLB thrashing and poor memory locality in this hot code path because snapshot creation touches many rw_trx_hash nodes distributed across memory, including dummy nodes that are irrelevant for snapshot construction. In addition, traversing LF_HASH requires issuing heavyweight memory barriers. This is a performance regression after 53cc9aa, which changed MVCC snapshot creation to scan LF_HASH instead of maintaining a global sorted vector protected by the global mutex. Add trx_sys.rw_trx_ids, a compact traversal-friendly vector of active read-write transaction identifiers and serialization numbers optimized for MVCC snapshot creation, while rw_trx_hash remains responsible for transaction lookup. The vector may contain empty slots corresponding to idle or read-only transactions that currently do not own a read-write transaction identifier. Such slots are skipped by snapshot creation. This reduces traversal overhead during MVCC snapshot creation by improving memory locality, reducing TLB pressure, and avoiding repeated memory barriers required for rw_trx_hash traversal.
When calling buf_flush_ahead() with furious=false, the function updates the async target buf_flush_async_lsn and, if necessary notifies the page cleaner thread to start flushing more eagerly, to avoid a long stall later when checkpoint will be required. When many threads call buf_flush_ahead() with furious=false, if the update of buf_flush_async_lsn is gated inside buf_pool.flush_list_mutex, this can cause significant contention, just to deliver the new buf_flush_async_lsn value and a potential notification to the page cleaner thread. This commit enables, for the non furious case, lock-free update of buf_flush_async_lsn and lock-free check of the page cleaner idle flag, to avoid the contention on buf_pool.flush_list_mutex. The lock is acquired by the CAS-loop winner thread and only after the page cleaner is observed idle. The cleaner clears buf_flush_async_lsn via CAS, so a concurrent lock-free bump is preserved across the clear. Since the reads are not protected by the mutex, there is a chance that the decision to not signal the page cleaner thread is wrong. In the worst case though, under sustained redo-log pressure, eventually a wakeup signal will be delivered to the page cleaner thread anyway, so the risk of a long stall is limited. Similar reasoning applies to the possibly wrong decision taken by the page cleaner thread to go to idle: eventually it will be woken up.
Fix sbom_get_supplier() to correctly return supplier name to caller in all cases.
|
|
There was a problem hiding this comment.
Code Review
This pull request introduces several major changes, including a fix for the SBOM supplier name scope in CMake, the addition of fallback query mechanisms in mysqldump to support newer replica/binary log status commands, and a significant performance optimization in InnoDB's MVCC read view construction using a new rw_trx_vector container. It also refactors InnoDB's page cleaner background flushing to reduce mutex contention and adds unused attribute annotations to Groonga code to suppress compiler warnings. The reviewer feedback advises splitting these unrelated changes into separate pull requests and suggests using C++ boolean literals (true/false) instead of integer literals (1/0) for a boolean parameter in mysqldump.
|
|
||
| /* on merge conflict, bump to a higher version again */ | ||
| #define VER "10.19" | ||
| #define VER "10.20" |
There was a problem hiding this comment.
This pull request contains a large number of changes (such as mysqldump updates, InnoDB buffer pool/transaction vector refactoring, and Groonga warning fixes) that are completely unrelated to the SBOM supplier name fix described in the PR title and description. According to the general rules, unrelated optimizations or bug fixes should be addressed in separate pull requests targeted at the earliest applicable branch rather than being bundled into the current pull request. Please split these unrelated changes into their own dedicated pull requests.
References
- Unrelated optimizations or bug fixes should be addressed in separate pull requests targeted at the earliest applicable branch rather than being bundled into the current pull request.
| if ((error= mysql_query_with_error_report(mysql_con, res, query1, 1)) == -1) | ||
| error= mysql_query_with_error_report(mysql_con, res, query2, 0); |
There was a problem hiding this comment.
For better readability and type safety in C++, use true and false instead of 1 and 0 when passing arguments to the bool parameter no_parse_error of mysql_query_with_error_report.
if ((error= mysql_query_with_error_report(mysql_con, res, query1, true)) == -1)
error= mysql_query_with_error_report(mysql_con, res, query2, false);
Fix sbom_get_supplier() to correctly return supplier name to caller in all cases.-