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 JSON merge issue that would report imprecise diffs in some situations #8538

Merged
merged 2 commits into from
Nov 7, 2024

Conversation

nicktobey
Copy link
Contributor

If:

  • A chunk begins with an object "A"
  • A value "A.b" within this object was modified
  • The previous chunk was also modified

Then the differ would incorrectly report that the entire "A" object had been modified, instead of the sub-value "A.b"

This could then lead to situations where the merge cannot be auto-resolved, because the differ claims that an object has been modified divergently, when it's actually two unrelated fields in the object that have been modified.

This PR fixes that scenario by properly detecting when the next chunk marks the start of an object.

@coffeegoddd
Copy link
Contributor

@nicktobey DOLT

comparing_percentages
100.000000 to 100.000000
version result total
c9b6269 ok 5937457
version total_tests
c9b6269 5937457
correctness_percentage
100.0

Copy link
Contributor

@fulghum fulghum left a comment

Choose a reason for hiding this comment

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

LGTM

@nicktobey nicktobey merged commit 1785ef9 into main Nov 7, 2024
34 of 35 checks passed
@nicktobey nicktobey deleted the nicktobey/json2 branch November 7, 2024 00:59
Copy link

github-actions bot commented Nov 7, 2024

@coffeegoddd DOLT

test_name detail row_cnt sorted mysql_time sql_mult cli_mult
batching LOAD DATA 10000 1 0.06 1.33
batching batch sql 10000 1 0.08 1.5
batching by line sql 10000 1 0.07 1.71
blob 1 blob 200000 1 0.87 3.86 3.68
blob 2 blobs 200000 1 0.87 4.37 4.49
blob no blob 200000 1 0.89 2.35 2.02
col type datetime 200000 1 0.81 2.93 2.81
col type varchar 200000 1 0.65 3.48 2.91
config width 2 cols 200000 1 0.81 2.31 1.94
config width 32 cols 200000 1 1.84 1.99 2.29
config width 8 cols 200000 1 0.99 2.23 1.95
pk type float 200000 1 1.09 1.73 1.45
pk type int 200000 1 1.07 1.75 1.41
pk type varchar 200000 1 1.84 1.41 1.12
row count 1.6mm 1600000 1 5.64 2.81 2.28
row count 400k 400000 1 1.44 2.69 2.19
row count 800k 800000 1 2.83 2.75 2.25
secondary index four index 200000 1 3.55 1.35 1.05
secondary index no secondary 200000 1 0.89 2.29 2.04
secondary index one index 200000 1 1.13 2.28 1.93
secondary index two index 200000 1 1.96 1.7 1.39
sorting shuffled 1mm 1000000 0 5.31 2.68 2.35
sorting sorted 1mm 1000000 1 5.42 2.72 2.25

Copy link

github-actions bot commented Nov 7, 2024

@coffeegoddd DOLT

name detail mean_mult
dolt_blame_basic system table 1.13
dolt_blame_commit_filter system table 2.87
dolt_commit_ancestors_commit_filter system table 0.58
dolt_commits_commit_filter system table 1.05
dolt_diff_log_join_from_commit system table 2.06
dolt_diff_log_join_to_commit system table 2.08
dolt_diff_table_from_commit_filter system table 1.2
dolt_diff_table_to_commit_filter system table 1.21
dolt_diffs_commit_filter system table 1
dolt_history_commit_filter system table 1.42
dolt_log_commit_filter system table 1.17

Copy link

github-actions bot commented Nov 7, 2024

@coffeegoddd DOLT

name add_cnt delete_cnt update_cnt latency
adds_only 60000 0 0 0.72
adds_updates_deletes 60000 60000 60000 3.79
deletes_only 0 60000 0 1.84
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.

3 participants