perf: start the goroutine after need to create a snapshot (#17158)
This commit is contained in:
parent
c3daf03e61
commit
54ed7dab39
@ -25,6 +25,11 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
||||
|
||||
## [Unreleased]
|
||||
|
||||
### Improvements
|
||||
|
||||
* [#17158](https://github.com/cosmos/cosmos-sdk/pull/17158) Start the goroutine after need to create a snapshot.
|
||||
|
||||
|
||||
## [v1.0.0-alpha.1](https://github.com/cosmos/cosmos-sdk/releases/tag/store%2Fv1.0.0-alpha.1) - 2023-07-11
|
||||
|
||||
### Features
|
||||
|
||||
@ -514,7 +514,8 @@ func (m *Manager) SnapshotIfApplicable(height int64) {
|
||||
m.logger.Debug("snapshot is skipped", "height", height)
|
||||
return
|
||||
}
|
||||
m.snapshot(height)
|
||||
// start the routine after need to create a snapshot
|
||||
go m.snapshot(height)
|
||||
}
|
||||
|
||||
// shouldTakeSnapshot returns true is snapshot should be taken at height.
|
||||
|
||||
Loading…
Reference in New Issue
Block a user