Skip to content

Conversation

xpchild07
Copy link

Summary:
--------
InnoDB big data file unlink will cause serious stable problem on POSIX file system,
So InnoDB launch a background thread to truncate data file little by little.

The data file will firstly renamed into a temporary file when single tablespace is deleted,
then File Purge thread will truncate file asynchronously and slowly.

Add new DDL log (PURGE_FILE_LOG) to promise the DDL atomic.

Several variables control the behaviors:
  INNODB_DATA_FILE_PURGE: Whether enable the async purge strategy
  INNODB_DATA_FILE_PURGE_IMMEDIATE: Unlink data file rather than truncate
  INNODB_DATA_FILE_PURGE_ALL_AT_SHUTDOWN: Cleanup all when normal shutdown
  INNODB_DATA_FILE_PURGE_DIR: Temporary file directory
  INNODB_DATA_FILE_PURGE_INTERVAL: Purge time interval (by milliseconds)
  INNODB_DATA_FILE_PURGE_MAX_SIZE: Purge max size every time (by MB)
  INNODB_PRINT_DATA_FILE_PURGE_PROCESS: Print the process of file purge worker

    Summary:
    --------
    InnoDB big data file unlink will cause serious stable problem on POSIX file system,
    So InnoDB launch a background thread to truncate data file little by little.

    The data file will firstly renamed into a temporary file when single tablespace is deleted,
    then File Purge thread will truncate file asynchronously and slowly.

    Add new DDL log (PURGE_FILE_LOG) to promise the DDL atomic.

    Several variables control the behaviors:
      INNODB_DATA_FILE_PURGE: Whether enable the async purge strategy
      INNODB_DATA_FILE_PURGE_IMMEDIATE: Unlink data file rather than truncate
      INNODB_DATA_FILE_PURGE_ALL_AT_SHUTDOWN: Cleanup all when normal shutdown
      INNODB_DATA_FILE_PURGE_DIR: Temporary file directory
      INNODB_DATA_FILE_PURGE_INTERVAL: Purge time interval (by milliseconds)
      INNODB_DATA_FILE_PURGE_MAX_SIZE: Purge max size every time (by MB)
      INNODB_PRINT_DATA_FILE_PURGE_PROCESS: Print the process of file purge worker
@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Please confirm this code is submitted under the terms of the OCA (Oracle's Contribution Agreement) you have previously signed by cutting and pasting the following text as a comment:
"I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it."
Thanks

@xpchild07
Copy link
Author

I confirm the code being submitted is offered under the terms of the OCA, and that I am authorized to contribute it.

@mysql-oca-bot
Copy link

Hi, thank you for your contribution. Your code has been assigned to an internal queue. Please follow
bug http://bugs.mysql.com/bug.php?id=95433 for updates.
Thanks

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.

2 participants