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

Exec new blocks in TxnNoSync. Prune after sending notifications in TxnSync #6222

Merged
merged 5 commits into from
Dec 9, 2022

Conversation

AskAlexSharov
Copy link
Collaborator

@AskAlexSharov AskAlexSharov commented Dec 7, 2022

Change from:

begin(TxNoSync)
exec new block, index nee data
do limited pruning 
commit()
send notifications about new data arrival to other apps, they may start reading new data at this time (by new read transactions) 

Change to:

begin(TxNoSync)
exec new block, index nee data
commit() // no fsync here
send notifications about new data arrival to other apps, they may start reading new data at this time (by new read transactions) 
begin()
do pruning 
commit() // fsync here

it allows notify earlier. Fsync (of all changes) on modern drives is fast, but on cloud-drives it’s about 1sec in worst cases.

@AskAlexSharov AskAlexSharov changed the title [wip] Prune between blocks Exec new blocks in NoSync transaction, do pruning after sending notifications Dec 9, 2022
@AskAlexSharov AskAlexSharov changed the title Exec new blocks in NoSync transaction, do pruning after sending notifications Exec new blocks in TxnNoSync. Prune after sending notifications in TxnSync Dec 9, 2022
@AskAlexSharov AskAlexSharov merged commit 5c05ff4 into devel Dec 9, 2022
@AskAlexSharov AskAlexSharov deleted the prune_between_blocks branch December 9, 2022 12:48
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.

1 participant