Skip to content

Commit

Permalink
feat: make gen4 the default planner for release 14
Browse files Browse the repository at this point in the history
Signed-off-by: Andres Taylor <[email protected]>
  • Loading branch information
systay committed Mar 10, 2022
1 parent f6f0ae0 commit 4548713
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions go/vt/vtgate/planbuilder/builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,9 +111,11 @@ func getConfiguredPlanner(vschema plancontext.VSchema, v3planner func(string) se
fallback: v3planner(query),
}
return fp.plan, nil
default:
// default is v3 plan
case V3:
return v3planner(query), nil
default:
// default is gen4 plan
return gen4Planner(query, Gen4), nil
}
}

Expand Down
2 changes: 1 addition & 1 deletion go/vt/vtgate/vtgate.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ var (
// Put set-passthrough under a flag.
sysVarSetEnabled = flag.Bool("enable_system_settings", true, "This will enable the system settings to be changed per session at the database connection level")
setVarEnabled = flag.Bool("enable_set_var", true, "This will enable the use of MySQL's SET_VAR query hint for certain system variables instead of using reserved connections")
plannerVersion = flag.String("planner_version", "v3", "Sets the default planner to use when the session has not changed it. Valid values are: V3, Gen4, Gen4Greedy and Gen4Fallback. Gen4Fallback tries the new gen4 planner and falls back to the V3 planner if the gen4 fails. All Gen4 versions should be considered experimental!")
plannerVersion = flag.String("planner_version", "gen4", "Sets the default planner to use when the session has not changed it. Valid values are: V3, Gen4, Gen4Greedy and Gen4Fallback. Gen4Fallback tries the gen4 planner and falls back to the V3 planner if the gen4 fails.")

// lockHeartbeatTime is used to set the next heartbeat time.
lockHeartbeatTime = flag.Duration("lock_heartbeat_time", 5*time.Second, "If there is lock function used. This will keep the lock connection active by using this heartbeat")
Expand Down

0 comments on commit 4548713

Please sign in to comment.