Print timestamp for all xtrabackup messages
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Percona XtraBackup moved to https://jira.percona.com/projects/PXB |
Triaged
|
Wishlist
|
Unassigned | ||
2.1 |
Triaged
|
Wishlist
|
Unassigned | ||
2.2 |
Triaged
|
Wishlist
|
Unassigned | ||
2.3 |
Triaged
|
Wishlist
|
Unassigned |
Bug Description
Looking on compact backup --rebuild-indexes process:
Rebuilding indexes for table tpcc/customer (space id: 20)
Found index idx_customer
Dropping 1 index(es).
Rebuilding 1 index(es).
Rebuilding indexes for table tpcc/district (space id: 19)
Rebuilding indexes for table tpcc/history (space id: 22)
Found index fkey_history_1
Found index fkey_history_2
Dropping 2 index(es).
Rebuilding 2 index(es).
Rebuilding indexes for table tpcc/item (space id: 17)
Rebuilding indexes for table tpcc/new_orders (space id: 23)
Rebuilding indexes for table tpcc/order_line (space id: 26)
Found index fkey_order_line_2
Dropping 1 index(es).
Rebuilding 1 index(es).
I wonder:
1. Can we print timestamp before each "Rebuilding indexes", just to know how long it take to rebuild.
2. Perform rebuilds in N parallel threads. I.e. table tpcc/order_line is rebuilt in Thread 1, and table tpcc/item in Thread 2, etc.
1. Sure.
2. xtrabackup calls InnoDB's row_merge_ build_indexes( ) which accepts multiple index definitions, then does the following:
a) scans the clustered index, and writes secondary index tuples into temporary files, one file per index
b) sorts index tuples from temporary files and populates index pages. This handles one index at a time.
So it would be possible to break a single row_merge_ build_indexes( ) call into many calls (one per index) and do it in parallel. But that would also mean that the clustered index would be scanned multiple times.
One way to fix this is to make fast index creation parallel in the server, so that step b) is performed with a specified number of threads. That would also provide the requested functionality after rebasing XB on the corresponding PS version.