Skip to content

MDEV-39708 SBOM contains wrong or missing supplier name for connector-c and libmarias3#5155

Closed
vaintroub wants to merge 11 commits into
mainfrom
MDEV-39708
Closed

MDEV-39708 SBOM contains wrong or missing supplier name for connector-c and libmarias3#5155
vaintroub wants to merge 11 commits into
mainfrom
MDEV-39708

Conversation

@vaintroub
Copy link
Copy Markdown
Member

Fix sbom_get_supplier() to correctly return supplier name to caller in all cases.-

montywi and others added 11 commits May 15, 2026 18:01
…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.
@vaintroub vaintroub requested a review from Copilot June 1, 2026 10:37
@CLAassistant
Copy link
Copy Markdown

CLAassistant commented Jun 1, 2026

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 8 committers have signed the CLA.

✅ dbart
✅ svoj
✅ vaintroub
❌ montywi
❌ sanja-byelkin
❌ dr-m
❌ iMineLink
❌ mariadb-YuchenPei
You have signed the CLA already but the status is still pending? Let us recheck it.

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment thread client/mysqldump.cc

/* on merge conflict, bump to a higher version again */
#define VER "10.19"
#define VER "10.20"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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
  1. 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.

Comment thread client/mysqldump.cc
Comment on lines +1537 to +1538
if ((error= mysql_query_with_error_report(mysql_con, res, query1, 1)) == -1)
error= mysql_query_with_error_report(mysql_con, res, query2, 0);
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

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);

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

10 participants