Skip to content
This repository was archived by the owner on Jan 20, 2026. It is now read-only.

Improve SeiDB replay&restart time by 2x#82

Merged
yzang2019 merged 9 commits intomainfrom
yzang/SEI-8801
Mar 10, 2025
Merged

Improve SeiDB replay&restart time by 2x#82
yzang2019 merged 9 commits intomainfrom
yzang/SEI-8801

Conversation

@yzang2019
Copy link
Collaborator

@yzang2019 yzang2019 commented Jan 7, 2025

Describe your changes and provide context

Add parallelization for replaying changelog on all modules during restart. Reduced restart/replay time by 2x, 15 minutes -> 7 minutes

Testing performed to validate your change

Before this change:

Jan 07 11:13:43 ip-172-31-9-162 seid[38481]: 11:13AM INF Start catching up and replaying the MemIAVL changelog file
Jan 07 11:26:20 ip-172-31-9-162 seid[38481]: 11:26AM INF Finished the replay and caught up to version 0

After this change:

Jan 07 11:14:49 ip-172-31-2-59 seid[39128]: 11:14AM INF Start catching up and replaying the MemIAVL changelog file
Jan 07 11:21:57 ip-172-31-2-59 seid[39128]: 11:21AM INF Finished the replay and caught up to version 0

Comment on lines +131 to +137

func (t *Tree) WaitToCompleteAsyncWrite() {
close(t.pendingChanges)
t.pendingWg.Wait()
t.pendingChanges = nil
}

Check notice

Code scanning / CodeQL

Spawning a Go routine Note

Spawning a Go routine may be a possible source of non-determinism
@yzang2019 yzang2019 merged commit 205f015 into main Mar 10, 2025
4 of 5 checks passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants