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

Fix nil write session panic #7792

Merged
merged 5 commits into from
Apr 30, 2024
Merged

Fix nil write session panic #7792

merged 5 commits into from
Apr 30, 2024

Conversation

max-hoffman
Copy link
Contributor

No description provided.

Copy link
Member

@zachmu zachmu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@@ -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")
Copy link
Member

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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

false

@coffeegoddd
Copy link
Contributor

@max-hoffman DOLT

comparing_percentages
100.000000 to 100.000000
version result total
846a102 ok 5937457
version total_tests
846a102 5937457
correctness_percentage
100.0

@coffeegoddd
Copy link
Contributor

@max-hoffman DOLT

comparing_percentages
100.000000 to 100.000000
version result total
4c7c436 ok 5937457
version total_tests
4c7c436 5937457
correctness_percentage
100.0

@max-hoffman max-hoffman merged commit 5600e26 into main Apr 30, 2024
19 of 20 checks passed
@max-hoffman max-hoffman deleted the max/nil-write-session-panic branch April 30, 2024 00:23
@coffeegoddd
Copy link
Contributor

@coffeegoddd DOLT

comparing_percentages
100.000000 to 100.000000
version result total
3286c11 ok 5937457
version total_tests
3286c11 5937457
correctness_percentage
100.0

Copy link

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.05 1.4
batching batch sql 10000 1 0.07 2
batching by line sql 10000 1 0.07 1.86
blob 1 blob 200000 1 0.9 4.02 4.47
blob 2 blobs 200000 1 0.87 5.08 5.64
blob no blob 200000 1 0.89 2.1 2.2
col type datetime 200000 1 0.81 2.63 2.84
col type varchar 200000 1 0.68 3.09 3.28
config width 2 cols 200000 1 0.76 2.22 2.32
config width 32 cols 200000 1 1.9 1.75 2.51
config width 8 cols 200000 1 0.98 2.04 2.32
pk type float 200000 1 0.85 2.2 2.08
pk type int 200000 1 0.76 2.54 2.3
pk type varchar 200000 1 1.56 1.46 1.47
row count 1.6mm 1600000 1 5.69 2.46 2.56
row count 400k 400000 1 1.4 2.43 2.56
row count 800k 800000 1 2.85 2.43 2.55
secondary index four index 200000 1 3.59 1.28 1.08
secondary index no secondary 200000 1 0.89 2.1 2.22
secondary index one index 200000 1 1.14 2.08 2.15
secondary index two index 200000 1 1.99 1.57 1.52
sorting shuffled 1mm 1000000 0 5.39 2.48 2.46
sorting sorted 1mm 1000000 1 5.34 2.49 2.47

Copy link

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.28
dolt_blame_commit_filter system table 3.31
dolt_commit_ancestors_commit_filter system table 0.81
dolt_commits_commit_filter system table 0.94
dolt_diff_log_join_from_commit system table 2.07
dolt_diff_log_join_to_commit system table 2.1
dolt_diff_table_from_commit_filter system table 1.1
dolt_diff_table_to_commit_filter system table 1.14
dolt_diffs_commit_filter system table 1
dolt_history_commit_filter system table 1.22
dolt_log_commit_filter system table 0.97

Copy link

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.7
adds_updates_deletes 60000 60000 60000 3.74
deletes_only 0 60000 0 1.85
updates_only 0 0 60000 2.43

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants