Update patch set 2

Patch Set 2:

Yeah, that's what I saw when this option was enabled (the default), it would leave the last row in the table intact.  For certain rarely used nova objects, that last row would be one that needed to be archived in order to allow another table to get archived (due to foreign keys.)  So in our case, we would probably always run this with -a (--nosafe-auto-increment)

The pt-archiver man page has a pretty good description of the risks of this:

"--[no]safe-auto-increment
default: yes

Do not archive row with max AUTO_INCREMENT.

Adds an extra WHERE clause to prevent pt-archiver from removing the newest row when ascending a single-column AUTO_INCREMENT key. This guards against re-using AUTO_INCREMENT values if the server restarts, and is enabled by default.

The extra WHERE clause contains the maximum value of the auto-increment column as of the beginning of the archive or purge job. If new rows are inserted while pt-archiver is running, it will not see them."

I feel like it's best to maintain the default behavior of this script before these changes.  That way if someone is already using it, and they update, the behavior won't change.

Patch-set: 2
Reviewer: Gerrit User 9060 <9060@4a232e18-c5a9-48ee-94c0-e04e7cca6543>
Label: Verified=0
This commit is contained in:
Gerrit User 9060 2015-10-06 17:55:05 +00:00 committed by Gerrit Code Review
parent b09a5bdc1b
commit 0484f2839c

Diff Content Not Available