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

[Merged by Bors] - mesh: refactor Updates handling #5160

Closed
wants to merge 13 commits into from

Conversation

dshulyak
Copy link
Contributor

@dshulyak dshulyak commented Oct 16, 2023

still able to reproduce the bug below.

2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory.

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.

@codecov
Copy link

codecov bot commented Oct 16, 2023

Codecov Report

Merging #5160 (3ac3501) into develop (7b0b133) will decrease coverage by 0.2%.
The diff coverage is 72.5%.

@@            Coverage Diff            @@
##           develop   #5160     +/-   ##
=========================================
- Coverage     77.7%   77.6%   -0.2%     
=========================================
  Files          259     259             
  Lines        30516   30457     -59     
=========================================
- Hits         23724   23640     -84     
- Misses        5302    5324     +22     
- Partials      1490    1493      +3     
Files Coverage Δ
config/mainnet.go 96.3% <ø> (-0.1%) ⬇️
mesh/executor.go 81.1% <100.0%> (+1.1%) ⬆️
tortoise/recover.go 47.0% <50.0%> (-0.8%) ⬇️
mesh/mesh.go 64.1% <72.7%> (-4.5%) ⬇️
tortoise/algorithm.go 71.7% <69.2%> (-1.9%) ⬇️
tortoise/tracer.go 67.0% <52.9%> (-1.5%) ⬇️

... and 7 files with indirect coverage changes

@dshulyak dshulyak marked this pull request as ready for review October 16, 2023 07:55
syncer/syncer_test.go Outdated Show resolved Hide resolved
syncer/state_syncer_test.go Outdated Show resolved Hide resolved
syncer/state_syncer_test.go Outdated Show resolved Hide resolved
@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 16, 2023
still able to reproduce the bug below.  

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory. 

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
@bors
Copy link

bors bot commented Oct 16, 2023

Build failed (retrying...):

bors bot pushed a commit that referenced this pull request Oct 16, 2023
still able to reproduce the bug below.  

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory. 

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
@bors
Copy link

bors bot commented Oct 16, 2023

Canceled.

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 16, 2023
still able to reproduce the bug below.  

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory. 

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
@bors
Copy link

bors bot commented Oct 16, 2023

Build failed:

  • systest-status

@dshulyak
Copy link
Contributor Author

bors try

bors bot added a commit that referenced this pull request Oct 16, 2023
@bors
Copy link

bors bot commented Oct 16, 2023

try

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@dshulyak
Copy link
Contributor Author

bors merge

bors bot pushed a commit that referenced this pull request Oct 16, 2023
still able to reproduce the bug below.  

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory. 

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
@bors
Copy link

bors bot commented Oct 16, 2023

Pull request successfully merged into develop.

Build succeeded!

The publicly hosted instance of bors-ng is deprecated and will go away soon.

If you want to self-host your own instance, instructions are here.
For more help, visit the forum.

If you want to switch to GitHub's built-in merge queue, visit their help page.

@bors bors bot changed the title mesh: refactor Updates handling [Merged by Bors] - mesh: refactor Updates handling Oct 16, 2023
@bors bors bot closed this Oct 16, 2023
dshulyak added a commit that referenced this pull request Oct 16, 2023
still able to reproduce the bug below.

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory.

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
poszu pushed a commit that referenced this pull request Oct 17, 2023
still able to reproduce the bug below.  

> 2023-10-02T15:28:14.002+0200 WARN fd68b.sync mesh failed to process layer from sync {"node_id": "fd68b9397572556c2f329f3e5af2faf23aef85dbbbb7e38447fae2f4ef38899f", "module": "sync", "sessionId": "29422935-68d6-47d1-87a8-02293aa181f3", "layer_id": 23104, "errmsg": "requested layer 8063 is before evicted 13102", "name": "sync"}

in the change i removed Results method from tortoise, and instead keeping Updates until mesh applies block and notifies tortoise that the block was applied, only then tortoise is free to evict results from memory. 

OnApplied has layer and opinion in the signature. Opinion is a unique representation of consensus state. If it changed while blocks were applied it means that history changed and we should not evict pending results.
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

2 participants