Skip to content

Txpool: db unlimited grow fix#8596

Merged
yperbasis merged 3 commits intorelease/2.53from
txpool_db_grow
Oct 27, 2023
Merged

Txpool: db unlimited grow fix#8596
yperbasis merged 3 commits intorelease/2.53from
txpool_db_grow

Conversation

@AskAlexSharov
Copy link
Collaborator

@AskAlexSharov AskAlexSharov commented Oct 27, 2023

read transaction was opened before stream.Recv(), but stream.Recv() is blocking infinity loop. so, this read transaction never rollback - causing unlimited db grow.

@AskAlexSharov AskAlexSharov changed the base branch from devel to release/2.53 October 27, 2023 03:08
@AskAlexSharov AskAlexSharov changed the title Txpool: db grow fix Txpool: db unlimited grow fix Oct 27, 2023
if err != nil {
return err
}
return nil
Copy link
Member

@yperbasis yperbasis Oct 27, 2023

Choose a reason for hiding this comment

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

This line + 3 lines above could be simplified to return err

}
} else {
unwindTxs.Append(utx, sender, false)
continue
Copy link
Member

Choose a reason for hiding this comment

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

To my mind the previous version with if change.Direction == remote.Direction_UNWIND was clearer

@yperbasis yperbasis requested a review from somnergy October 27, 2023 08:55
@yperbasis yperbasis merged commit 1c978a8 into release/2.53 Oct 27, 2023
@yperbasis yperbasis deleted the txpool_db_grow branch October 27, 2023 11:44
yperbasis added a commit that referenced this pull request Oct 29, 2023
read transaction was opened before stream.Recv(), but stream.Recv() is
blocking infinity loop. so, this read transaction never rollback -
causing unlimited db grow.

---------

Co-authored-by: Andrew Ashikhmin <34320705+yperbasis@users.noreply.github.com>
yperbasis added a commit that referenced this pull request Oct 29, 2023
read transaction was opened before stream.Recv(), but stream.Recv() is
blocking infinity loop. so, this read transaction never rollback -
causing unlimited db grow.

---------

Merge PR #8596 into `devel`

---------

Co-authored-by: Alex Sharov <AskAlexSharov@gmail.com>
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.

2 participants