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: conflict check when reference right is none #40

Merged
merged 2 commits into from
Jan 27, 2024

Conversation

darkskygit
Copy link
Collaborator

@darkskygit darkskygit commented Jan 27, 2024

fix a edge case:

Node {
  id: { client: 1, id: 2}
  left: { client: 1, id: 3}
  right: { client: 1, id: 3}
}

in old version, this will lead to a dead loop of node's conflict resolve logics that refered to this node

@codecov-commenter
Copy link

codecov-commenter commented Jan 27, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (4d6a29c) 77.96% compared to head (e027223) 78.12%.

❗ Your organization needs to install the Codecov GitHub app to enable full functionality.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #40      +/-   ##
==========================================
+ Coverage   77.96%   78.12%   +0.15%     
==========================================
  Files          52       52              
  Lines        7752     7771      +19     
==========================================
+ Hits         6044     6071      +27     
+ Misses       1708     1700       -8     
Flag Coverage Δ
node-binding-test 36.92% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

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

Copy link

Benchmark for Linux

Click to view benchmark
Test Base PR %
codec/jwst decode var_int (32 bit) 212.2±0.28µs 212.8±1.59µs +0.28%
codec/jwst decode var_uint (32 bit) 180.8±0.65µs 180.7±0.46µs -0.06%
codec/jwst decode var_uint (64 bit) 180.4±0.53µs 180.6±0.60µs +0.11%
codec/jwst encode var_int (32 bit) 334.8±7.90µs 334.0±2.14µs -0.24%
codec/jwst encode var_uint (32 bit) 250.9±11.17µs 248.0±3.27µs -1.16%
codec/jwst encode var_uint (64 bit) 249.1±6.14µs 249.0±3.42µs -0.04%
codec/lib0 decode var_int (64 bit) 185.8±2.28µs 186.6±3.00µs +0.43%
codec/lib0 decode var_uint (32 bit) 155.0±5.67µs 152.8±2.23µs -1.42%
codec/lib0 decode var_uint (64 bit) 154.7±3.18µs 154.4±2.75µs -0.19%
codec/lib0 encode var_int (64 bit) 384.8±3.61µs 385.0±1.19µs +0.05%
codec/lib0 encode var_uint (32 bit) 372.9±0.45µs 373.7±0.37µs +0.21%
codec/lib0 encode var_uint (64 bit) 373.1±1.64µs 373.8±0.88µs +0.19%
ops/array/jwst/insert 105.5±0.64µs 105.2±0.45µs -0.28%
ops/array/jwst/insert range 155.2±2.06µs 158.2±0.83µs +1.93%
ops/array/jwst/remove 60.3±0.33µs 60.9±0.33µs +1.00%
ops/array/yrs/insert 58.0±2.19µs 51.5±0.44µs -11.21%
ops/array/yrs/insert range 74.7±0.21µs 75.8±1.02µs +1.47%
ops/array/yrs/remove 63.2±0.70µs 66.5±0.30µs +5.22%
ops/map/jwst/get 207.2±1.85ns 209.4±4.64ns +1.06%
ops/map/jwst/insert 3.2±0.03µs 3.2±0.02µs -0.00%
ops/map/jwst/remove 4.3±0.01µs 4.3±0.08µs -0.00%
ops/map/yrs/get 262.4±5.63ns 261.3±0.81ns -0.42%
ops/map/yrs/insert 3.9±0.11µs 3.9±0.03µs -0.00%
ops/map/yrs/remove 5.0±0.01µs 5.0±0.03µs -0.00%
ops/text/jwst/insert 67.4±0.41µs 67.6±0.51µs +0.30%
ops/text/jwst/remove 1396.5±11.89ns 1411.7±7.94ns +1.09%
ops/text/yrs/insert 27.4±0.89µs 27.0±0.19µs -1.46%
ops/text/yrs/remove 1728.3±3.95ns 1714.8±18.44ns -0.78%
update/parse with jwst/basic.bin 39.8±0.27µs 39.2±0.12µs -1.51%
update/parse with jwst/database.bin 31.8±0.33µs 31.7±0.11µs -0.31%
update/parse with jwst/large.bin 3.2±0.02ms 3.2±0.03ms -0.00%
update/parse with jwst/with-subdoc.bin 5.2±0.04µs 5.5±0.03µs +5.77%
update/parse with yrs/basic.bin 29.9±0.50µs 30.3±0.15µs +1.34%
update/parse with yrs/database.bin 24.1±0.09µs 24.3±0.11µs +0.83%
update/parse with yrs/large.bin 2.4±0.01ms 2.3±0.01ms -4.17%
update/parse with yrs/with-subdoc.bin 3.5±0.03µs 4.1±0.01µs +17.14%

Benchmark for Windows

Click to view benchmark
Test Base PR %
codec/jwst decode var_int (32 bit) 243.1±1.40µs 242.4±0.72µs -0.29%
codec/jwst decode var_uint (32 bit) 180.7±3.57µs 180.2±4.10µs -0.28%
codec/jwst decode var_uint (64 bit) 207.1±2.18µs 207.2±1.63µs +0.05%
codec/jwst encode var_int (32 bit) 303.4±2.97µs 302.8±3.70µs -0.20%
codec/jwst encode var_uint (32 bit) 267.9±5.38µs 271.0±2.05µs +1.16%
codec/jwst encode var_uint (64 bit) 267.3±3.76µs 264.9±2.76µs -0.90%
codec/lib0 decode var_int (64 bit) 186.7±3.32µs 184.1±5.58µs -1.39%
codec/lib0 decode var_uint (32 bit) 157.5±8.68µs 155.5±6.33µs -1.27%
codec/lib0 decode var_uint (64 bit) 160.2±8.69µs 159.6±7.89µs -0.37%
codec/lib0 encode var_int (64 bit) 384.7±1.83µs 385.5±3.04µs +0.21%
codec/lib0 encode var_uint (32 bit) 375.4±5.31µs 373.2±1.47µs -0.59%
codec/lib0 encode var_uint (64 bit) 373.9±2.62µs 373.5±1.75µs -0.11%
ops/array/jwst/insert 124.0±0.78µs 124.7±2.70µs +0.56%
ops/array/jwst/insert range 183.7±1.48µs 180.1±0.64µs -1.96%
ops/array/jwst/remove 68.5±0.28µs 66.2±0.29µs -3.36%
ops/array/yrs/insert 76.5±0.93µs 72.7±0.39µs -4.97%
ops/array/yrs/insert range 100.2±1.61µs 99.5±0.91µs -0.70%
ops/array/yrs/remove 105.5±1.96µs 104.1±0.90µs -1.33%
ops/map/jwst/get 266.9±11.97ns 268.8±3.86ns +0.71%
ops/map/jwst/insert 5.1±0.03µs 4.8±0.04µs -5.88%
ops/map/jwst/remove 9.2±0.08µs 6.7±0.02µs -27.17%
ops/map/yrs/get 269.9±4.54ns 268.9±3.88ns -0.37%
ops/map/yrs/insert 5.7±0.11µs 5.8±0.06µs +1.75%
ops/map/yrs/remove 6.9±0.05µs 7.4±0.03µs +7.25%
ops/text/jwst/insert 88.2±0.51µs 84.6±0.64µs -4.08%
ops/text/jwst/remove 2.2±0.02µs 2.1±0.02µs -4.55%
ops/text/yrs/insert 33.4±0.46µs 31.9±0.21µs -4.49%
ops/text/yrs/remove 2.6±0.03µs 2.5±0.02µs -3.85%
update/parse with jwst/basic.bin 57.8±0.61µs 58.3±0.47µs +0.87%
update/parse with jwst/database.bin 45.0±0.91µs 46.1±0.19µs +2.44%
update/parse with jwst/large.bin 2.9±0.13ms 2.8±0.06ms -3.45%
update/parse with jwst/with-subdoc.bin 8.4±0.10µs 8.7±0.15µs +3.57%
update/parse with yrs/basic.bin 43.7±0.71µs 44.0±0.26µs +0.69%
update/parse with yrs/database.bin 35.5±0.18µs 35.6±0.31µs +0.28%
update/parse with yrs/large.bin 2.1±0.14ms 2.2±0.08ms +4.76%
update/parse with yrs/with-subdoc.bin 7.3±0.07µs 7.3±0.05µs -0.00%

@darkskygit darkskygit merged commit 01ec08a into main Jan 27, 2024
17 checks passed
@darkskygit darkskygit deleted the darksky/fix-conflict-check branch January 27, 2024 09:01
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.

None yet

3 participants