Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ddl: backport of (#38738) tidb_ddl_reorg commit conflicts #41115

Merged
merged 9 commits into from
Apr 11, 2023

Commits on Feb 6, 2023

  1. ddl: avoid commit conflicts when updating/delete from mysql.tidb_ddl_…

    …reorg. (pingcap#38738)
    
    * Added test case
    
    * ddl fix pingcap#38669.
    
    The issue was that mysql.tidb_ddl_reorg table was updated by an
    inner transaction after the outer transaction started,
    which then made a commit conflict in the outer transaction,
    when it deleted the same row.
    
    * Fixed typo in comment
    
    * Added test case for pingcap#24427
    
    * Disabled tests for CI testing
    
    * Revert "Disabled tests for CI testing"
    
    This reverts commit 17c28f3.
    
    * Revert "Revert "Disabled tests for CI testing""
    
    This reverts commit 65c84d9.
    
    * removed test skips
    
    * Clean up the tidb_ddl_reorg entry after DDL is completed
    
    * Use a cleanup job afterwards instead.
    
    * Fixed test
    
    * Moved cleanup before asyncNotify
    
    * More detailed test failure log
    
    * Refined test error message
    
    * Injecting timoeut to get stack traces from CI
    
    * Updated Debug Dump on timeout
    
    * Delete mulitple entries in tidb_ddl_reorg if needed
    
    * Linting
    
    * Linting
    
    * Added CI debug logs
    
    * Linting + CI debugs
    
    * fixed CI debug
    
    * Try to cleanup also if job.State == synced
    
    * check for non-error of runErr instead of error...
    
    * Use a new session, instead of reusing worker.sess
    
    * Also handle case when job == nil
    
    * Removed CI debug logs
    
    * Misssed change session from w.sess to newly created sess
    
    * Improved TestConcurrentDDLSwitch and added CI debug logs
    
    * Always cleaning up all orphan mysql.tidb_ddl_reorg entries
    
    * linting
    
    * Also cleanup if job is nil
    
    * Updated TestModifyColumnReorgInfo + CI debug logs
    
    * more CI debug
    
    * refactored the cleanupDDLReorgHandle code
    
    * Added missing cleanup in handleDDLJobQueue
    
    * Removed debug panic
    
    * Code cleanup
    
    * Test updates
    
    * Debug cleanup
    
    * Cleaned up test after removal of old non-concurrent DDL code merge
    
    * Linting
    
    * always wrap changes to tidb_ddl_reorg in an own transaction
    
    + fixed some typos
    
    * Minimum fix
    
    * Always update reorg meta, not only on error
    
    * Issue is here :)
    
    * Fixed newReorgHandler
    
    * Wrapped more tidb_ddl_reorg changes into separate transactions
    
    * linting
    
    * Removed updateDDLReorgStartHandle
    
    * cleanups
    
    * Made runInTxn a method on *session, instead of normal function
    
    * Update test
    
    * Final touches
    
    * Removed duplicate test
    
    * CleanupDDLReorgHandles should only be called from HandleJobDone.
    
    * Variable rename
    
    * Renamed 'delete' variabel name
    
    * Updated test
    
    * small revert
    
    * Removed timeout debugging code
    
    * Simplified the cleanup to only start a new txn and not a new session
    
    * Reverted the change of GetDDLInfo
    
    Co-authored-by: Ti Chi Robot <[email protected]>
    mjonss and ti-chi-bot committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    176b2be View commit details
    Browse the repository at this point in the history
  2. Linting

    mjonss committed Feb 6, 2023
    Configuration menu
    Copy the full SHA
    8b07969 View commit details
    Browse the repository at this point in the history

Commits on Feb 21, 2023

  1. Configuration menu
    Copy the full SHA
    2ce98d3 View commit details
    Browse the repository at this point in the history

Commits on Apr 10, 2023

  1. Configuration menu
    Copy the full SHA
    76f02d8 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    7662330 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    dc5dbaf View commit details
    Browse the repository at this point in the history

Commits on Apr 11, 2023

  1. Configuration menu
    Copy the full SHA
    1fdd10e View commit details
    Browse the repository at this point in the history
  2. Test update

    mjonss committed Apr 11, 2023
    Configuration menu
    Copy the full SHA
    d72e8b7 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    96f8a1f View commit details
    Browse the repository at this point in the history