-
-
Notifications
You must be signed in to change notification settings - Fork 481
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
Fix nil write session panic #7792
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
go/libraries/doltcore/sqle/tables.go
Outdated
@@ -1735,6 +1739,10 @@ func fullTextRewriteEditor( | |||
// We need our own write session for the rewrite operation. The connection's session must continue to return rows of | |||
// the table as it existed before the rewrite operation began until it completes, at which point we update the | |||
// session with the rewritten table. | |||
if ws := dbState.WriteSession(); ws != nil { | |||
return nil, fmt.Errorf("cannot rebuild index on a headless branch") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Cannot rebuild index on read-only database %s"
branchState.WriteSession().SetOptions(opts) | ||
if ws := branchState.WriteSession(); ws != nil { | ||
opts := ws.GetOptions() | ||
opts.ForeignKeyChecksDisabled = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
false
@max-hoffman DOLT
|
@max-hoffman DOLT
|
@coffeegoddd DOLT
|
@coffeegoddd DOLT
|
@coffeegoddd DOLT
|
@coffeegoddd DOLT
|
No description provided.