Patch failed for latest pt-online-schema-change
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 30/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- mysql
- Lĩnh vực
- database
Hướng nghiên cứu
Bắt đầu với ptosc-patch/0001-ptosc-square-changes.patch, tệp đích 3.0 và tệp 3.0.rej được tạo; so sánh ba hunk bị lỗi với mã nguồn mới nhất của pt-online-schema-change 3.0.13. Hoàn tất nghĩa là patch được áp dụng mà không có hunk bị lỗi và không tạo ra tệp reject nào.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Patch command is getting failed while applying the patch file for the latest percona toolkit (3.0.13).
Logs:
root@localhost:/opt/shift/files# patch 3.0 ptosc-patch/0001-ptosc-square-changes.patch
patching file 3.0
Hunk #1 succeeded at 28 (offset 1 line).
Hunk #2 succeeded at 3701 (offset 157 lines).
Hunk #3 succeeded at 3787 (offset 157 lines).
Hunk #4 succeeded at 5728 (offset 346 lines).
Hunk #5 succeeded at 5743 (offset 346 lines).
Hunk #6 succeeded at 5864 (offset 365 lines).
Hunk #7 succeeded at 6089 (offset 372 lines).
Hunk #8 succeeded at 6101 (offset 372 lines).
Hunk #9 succeeded at 8358 with fuzz 1 (offset 253 lines).
Hunk #10 succeeded at 8956 (offset 365 lines).
Hunk #11 succeeded at 9191 (offset 371 lines).
Hunk #12 succeeded at 9223 (offset 371 lines).
Hunk #13 succeeded at 9257 (offset 371 lines).
Hunk #14 succeeded at 9349 (offset 371 lines).
Hunk #15 succeeded at 9471 (offset 371 lines).
Hunk #16 succeeded at 9513 (offset 371 lines).
Hunk #17 succeeded at 9538 (offset 371 lines).
Hunk #18 succeeded at 9560 (offset 371 lines).
Hunk #19 succeeded at 9578 (offset 371 lines).
Hunk #20 succeeded at 9770 (offset 371 lines).
Hunk #21 succeeded at 9806 (offset 371 lines).
Hunk #22 succeeded at 9912 (offset 381 lines).
Hunk #23 succeeded at 9940 (offset 381 lines).
Hunk #24 succeeded at 9962 (offset 381 lines).
Hunk #25 succeeded at 10006 (offset 381 lines).
Hunk #26 succeeded at 10195 (offset 424 lines).
Hunk #27 succeeded at 10236 (offset 424 lines).
Hunk #28 succeeded at 10251 (offset 424 lines).
Hunk #29 succeeded at 10641 (offset 505 lines).
Hunk #30 succeeded at 10656 (offset 505 lines).
Hunk #31 FAILED at 10256.
Hunk #32 succeeded at 10860 (offset 568 lines).
Hunk #33 succeeded at 10882 (offset 566 lines).
Hunk #34 succeeded at 10911 (offset 566 lines).
Hunk #35 FAILED at 10359.
Hunk #36 succeeded at 11255 (offset 612 lines).
Hunk #37 FAILED at 10709.
Hunk #38 succeeded at 11684 (offset 773 lines).
Hunk #39 succeeded at 12460 (offset 842 lines).
Hunk #40 succeeded at 12537 (offset 879 lines).
Hunk #41 succeeded at 12569 with fuzz 2 (offset 891 lines).
Hunk #42 succeeded at 12691 with fuzz 2 (offset 944 lines).
Hunk #43 succeeded at 12843 with fuzz 2 (offset 993 lines).
Hunk #44 succeeded at 12914 with fuzz 2 (offset 1015 lines).
Hunk #45 succeeded at 12986 (offset 1016 lines).
3 out of 45 hunks FAILED -- saving rejects to file 3.0.rej
3.0.rej file:
--- pt-online-schema-change 2017-07-17 09:46:31.000000000 -0700
+++ pt-online-schema-change 2017-07-17 09:46:31.000000000 -0700
@@ -10256,6 +10583,16 @@
elsif ( $o->get('execute') ) {
print ts("Swapping tables...\n");
+ if ( $o->get('swap-table-name') ) {
+ $table_name = $o->get('swap-table-name');
+ $table_name =~ s/%T/$orig_tbl->{name}/g;
+ use POSIX 'strftime';
+ my $timestamp = strftime("%Y%m%d%H%M%S", localtime(time()));
+ $table_name =~ s/%D/$timestamp/g;
+ } else {
+ $table_name = $prefix . $table_name;
+ }
+
while ( $name_tries-- ) {
$table_name = $prefix . $table_name;
@@ -10359,7 +10720,10 @@
. ' LIKE ' . $q->literal_like($orig_tbl->{tbl});
PTDEBUG && _d($sql);
my $triggers = $dbh->selectall_arrayref($sql);
- if ( $triggers && @$triggers ) {
+ # Don't quit on existing triggers if running from a saved state. The triggers
+ # are expected to be present.
+ if ( $triggers && @$triggers &&
+ (!defined $loaded_step || (defined $loaded_step && !grep { $_ eq $loaded_step } qw(triggers copy rename)))) {
die "The table $orig_tbl->{name} has triggers. This tool "
. "needs to create its own triggers, so the table cannot "
. "already have triggers.\n";
@@ -10709,8 +11074,11 @@
@drop_trigger_sqls = ();
foreach my $trg ( @triggers ) {
my ($name, $sql) = @$trg;
- print $sql, "\n" if $o->get('print');
- if ( $o->get('execute') ) {
+ print "$name trigger: $sql\n";
+ # Don't create triggers if running from a saved state. They should already
+ # be there.
+ if ( $o->get('execute') &&
+ (!defined $loaded_step || (defined $loaded_step && !grep { $_ eq $loaded_step } qw(triggers copy rename)))) {
osc_retry(
Cxn => $cxn,
Retry => $retry,
Please let me know how to patch it without getting failed.
- Ngôn ngữ chính
- Ruby
- Star
- 739
- Fork
- 52
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của square/shift
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 68/100
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 30/100
-
iĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
logo.imgĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
-
helpĐang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 1/100
Issue tương tự
-
NoMethodError in auth#createĐang mởbugsnag
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
JoeMcB/improvcoaches#827 ·
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
TheOdinProject/curriculum#31465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
area: docs eco: ruby good first issue help wanted lane: free-agent roadmap size: XS type: docs
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 66/100
arminazimi/evergreen#465 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 66/100
-
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 72/100
simp/puppetsync#120 ·
Maintainer thường phản hồi trong vòng 2 ngày