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

executor, planner: fix plan_replayer zip format #47474

Merged
merged 1 commit into from
Oct 11, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions executor/plan_replayer.go
Original file line number Diff line number Diff line change
Expand Up @@ -486,7 +486,7 @@
continue
}
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "schema") == 0 {
if len(path) == 2 && strings.Compare(path[0], "schema") == 0 && zipFile.Mode().IsRegular() {

Check warning on line 489 in executor/plan_replayer.go

View check run for this annotation

Codecov / codecov/patch

executor/plan_replayer.go#L489

Added line #L489 was not covered by tests
err = createSchemaAndItems(e.Ctx, zipFile)
if err != nil {
return err
Expand All @@ -503,7 +503,7 @@
// build view next
for _, zipFile := range z.File {
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "view") == 0 {
if len(path) == 2 && strings.Compare(path[0], "view") == 0 && zipFile.Mode().IsRegular() {

Check warning on line 506 in executor/plan_replayer.go

View check run for this annotation

Codecov / codecov/patch

executor/plan_replayer.go#L506

Added line #L506 was not covered by tests
err = createSchemaAndItems(e.Ctx, zipFile)
if err != nil {
return err
Expand All @@ -514,7 +514,7 @@
// load stats
for _, zipFile := range z.File {
path := strings.Split(zipFile.Name, "/")
if len(path) == 2 && strings.Compare(path[0], "stats") == 0 {
if len(path) == 2 && strings.Compare(path[0], "stats") == 0 && zipFile.Mode().IsRegular() {

Check warning on line 517 in executor/plan_replayer.go

View check run for this annotation

Codecov / codecov/patch

executor/plan_replayer.go#L517

Added line #L517 was not covered by tests
err = loadStats(e.Ctx, zipFile)
if err != nil {
return err
Expand Down