Skip to content

Conversation

@nickchomey
Copy link
Contributor

This pull request introduces significant improvements to the benchmarking support for MySQL and MariaDB backends. The main changes include enhanced Docker configurations for both databases, robust error handling and verification for batch operations, and stricter correctness checks to ensure expected results.

Database Docker configuration enhancements:

  • Both mysql and mariadb Docker configurations now enable binary logging, set the binlog format to ROW, specify a server-id, and adjust binlog-row-image based on whether the configuration is optimized or default (MINIMAL for optimized, FULL for default). This ensures consistency and enables replication-related features. [1] [2] [3] [4]
  • For MySQL, the Docker configuration now uses innodb-redo-log-capacity instead of the deprecated innodb-log-file-size, aligning with changes in MySQL 8.0.30+. [1] [2]

Batch operation correctness and error handling:

  • Introduced a helper method exec_and_verify for both MysqlClient and MariadbClient to execute statements, verify the number of affected rows, and automatically retry on deadlock errors (error 1213), improving reliability of batch operations. [1] [2]
  • Batch create, update, and delete methods now use exec_and_verify to ensure the expected number of rows are affected, and return errors if not. [1] [2] [3] [4] [5] [6] [7] [8]
  • Batch methods now check for missing values for required columns and return errors if any are missing, preventing silent data inconsistencies. [1] [2] [3] [4] [5]

Correctness checks in batch reads:

  • Batch read methods now assert that the number of rows returned matches the number of keys requested, ensuring data consistency and surfacing unexpected issues early. [1] [2]

These changes collectively improve the reliability, correctness, and observability of the benchmarking framework for MySQL and MariaDB backends.

References:

Copilot AI review requested due to automatic review settings November 28, 2025 23:25
@nickchomey nickchomey changed the title Mariadb mysql Mariadb mysql fixes and improvements Nov 28, 2025
Copy link
Contributor

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.

Pull request overview

This pull request enhances MySQL and MariaDB benchmarking support with improved Docker configurations, robust error handling for batch operations, and stricter correctness verification. The changes enable binary logging with configurable row image formats, introduce automatic deadlock retry logic, add missing value validation, and verify affected row counts to ensure data consistency.

Key Changes:

  • Updated MySQL Docker config to use innodb-redo-log-capacity (replacing deprecated innodb-log-file-size for MySQL 8.0.30+) and added binary logging configuration
  • Added exec_and_verify helper method with automatic deadlock retry and row count verification for batch create/update/delete operations
  • Enhanced batch operations with missing column validation and strict row count assertions

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 6 comments.

File Description
src/mysql.rs Updated Docker configuration for MySQL 8.0.30+ compatibility, added binary logging settings (MINIMAL for optimized, FULL for default), implemented exec_and_verify helper with deadlock retry logic, enhanced batch operations with row count verification and missing value checks
src/mariadb.rs Added binary logging configuration matching MySQL changes, implemented identical exec_and_verify helper, enhanced batch operations with same validation and verification improvements

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nickchomey
Copy link
Contributor Author

i think copilot's suggestions were stupid. I implemented some and everything broke, because it was completely invalid syntax. Removed and force-pushed the original PR

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant