Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion lib/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,9 @@ func NewServer(
// This can happen if the node was terminated mid-operation last time it was running. The recovery process rolls back
// blocks to the beginning of the current snapshot epoch and resets to the state checksum to the epoch checksum.
if shouldRestart {
stateChangeSyncer.Reset()
if stateChangeSyncer != nil {
stateChangeSyncer.Reset()
}
glog.Errorf(CLog(Red, "NewServer: Forcing a rollback to the last snapshot epoch because node was not closed "+
"properly last time"))
if err := _snapshot.ForceResetToLastSnapshot(_chain); err != nil {
Expand Down
3 changes: 0 additions & 3 deletions lib/snapshot.go
Original file line number Diff line number Diff line change
Expand Up @@ -462,9 +462,6 @@ func (snap *Snapshot) Run() {
snap.SnapshotProcessBlock(operation.blockNode)

case SnapshotOperationProcessChunk:
// If operationQueueSemaphore is full, we are already storing too many chunks in memory. Block the thread while
// we wait for the queue to clear up.
snap.operationQueueSemaphore <- struct{}{}
glog.V(1).Infof("Snapshot.Run: Number of operations in the operation channel (%v)",
snap.OperationChannel.GetStatus())
if err := snap.SetSnapshotChunk(operation.mainDb, operation.mainDbMutex, operation.snapshotChunk,
Expand Down