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 updates to same row leading to incorrect write-write conflict errors #4063

Merged
merged 1 commit into from
Aug 12, 2024

Conversation

ray6080
Copy link
Contributor

@ray6080 ray6080 commented Aug 12, 2024

Description

This wasn't exposed due to our testing framework is always going through prepare first then execute, which hides the case of two consecutive write transactions Tx and Ty, where Ty is executing after Tx commits, and Ty's start timestamp is same as the commit timestamp of Tx.
Adding a cpp test case for now. Eventually we should also cover the cases of not going through prepare interface in our testing framework.

Also, removed the useless param requiredNexTx, which is always set to false, from executeAndAutoCommitIfNecessaryNoLock.

Fix #4056.

Copy link

Benchmark Result

Master commit hash: 93a3cd306c0958373382a955c89fb5e13960383a
Branch commit hash: ba13d3dfc38dc4f6187321129e1f153739d78c2c

Query Group Query Name Mean Time - Commit (ms) Mean Time - Master (ms) Diff
aggregation q24 682.90 673.30 9.60 (1.43%)
aggregation q28 11298.33 11683.05 -384.72 (-3.29%)
filter q14 153.56 146.19 7.37 (5.04%)
filter q15 151.28 144.28 7.01 (4.86%)
filter q16 331.37 322.90 8.47 (2.62%)
filter q17 475.79 464.77 11.02 (2.37%)
filter q18 2015.46 1939.56 75.90 (3.91%)
fixed_size_expr_evaluator q07 571.01 556.80 14.21 (2.55%)
fixed_size_expr_evaluator q08 789.97 762.77 27.20 (3.57%)
fixed_size_expr_evaluator q09 787.22 762.72 24.50 (3.21%)
fixed_size_expr_evaluator q10 269.60 257.69 11.91 (4.62%)
fixed_size_expr_evaluator q11 264.00 252.30 11.69 (4.63%)
fixed_size_expr_evaluator q12 263.61 251.70 11.91 (4.73%)
fixed_size_expr_evaluator q13 1492.39 1485.25 7.14 (0.48%)
fixed_size_seq_scan q23 145.09 134.99 10.10 (7.48%)
join q31 11.91 12.26 -0.35 (-2.88%)
ldbc_snb_ic q35 785.91 805.08 -19.17 (-2.38%)
ldbc_snb_ic q36 37.21 47.36 -10.15 (-21.43%)
ldbc_snb_is q32 10.14 8.17 1.96 (24.02%)
ldbc_snb_is q33 17.05 15.98 1.07 (6.67%)
ldbc_snb_is q34 8.31 8.17 0.14 (1.72%)
multi-rel multi-rel-large-scan 2860.96 3014.12 -153.17 (-5.08%)
multi-rel multi-rel-lookup 60.45 71.47 -11.01 (-15.41%)
multi-rel multi-rel-small-scan 52.18 68.36 -16.18 (-23.67%)
order_by q25 153.68 150.26 3.42 (2.28%)
order_by q26 475.17 481.08 -5.92 (-1.23%)
order_by q27 1443.15 1412.38 30.76 (2.18%)
scan_after_filter q01 201.98 190.64 11.34 (5.95%)
scan_after_filter q02 187.43 180.00 7.43 (4.13%)
shortest_path_ldbc100 q39 155.80 157.66 -1.86 (-1.18%)
var_size_expr_evaluator q03 2092.53 2078.20 14.33 (0.69%)
var_size_expr_evaluator q04 2293.19 2235.81 57.38 (2.57%)
var_size_expr_evaluator q05 2643.85 2550.46 93.39 (3.66%)
var_size_expr_evaluator q06 1348.98 1343.58 5.40 (0.40%)
var_size_seq_scan q19 1501.10 1474.23 26.88 (1.82%)
var_size_seq_scan q20 3180.04 3192.24 -12.19 (-0.38%)
var_size_seq_scan q21 2455.60 2456.38 -0.78 (-0.03%)
var_size_seq_scan q22 135.38 128.72 6.66 (5.17%)

Copy link

codecov bot commented Aug 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 85.11%. Comparing base (6a65178) to head (6f10802).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master    #4063      +/-   ##
==========================================
- Coverage   85.13%   85.11%   -0.02%     
==========================================
  Files        1297     1298       +1     
  Lines       50651    50669      +18     
  Branches     6982     6985       +3     
==========================================
+ Hits        43121    43127       +6     
- Misses       7391     7403      +12     
  Partials      139      139              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ray6080 ray6080 merged commit 9f2fc90 into master Aug 12, 2024
23 checks passed
@ray6080 ray6080 deleted the fix-4056 branch August 12, 2024 21:38
ray6080 added a commit that referenced this pull request Aug 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bug: Can not update node properties: write-write conflict in Auto transaction.
2 participants