Skip to content

Commit

Permalink
fix timer
Browse files Browse the repository at this point in the history
  • Loading branch information
sunny2022da committed Aug 21, 2024
1 parent 7ca80e3 commit c0fc7cf
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
5 changes: 4 additions & 1 deletion core/parallel_state_processor.go
Original file line number Diff line number Diff line change
Expand Up @@ -494,9 +494,10 @@ func (p *ParallelStateProcessor) runSlotLoop(slotIndex int, slotType int32) {

for {
loopBeginTime := time.Now()
startTime := time.Now()
select {
case <-stopChan:
totalRunSlotLoopDur = time.Since(loopBeginTime)
totalRunSlotLoopDur = time.Since(startTime)
log.Warn("RunSlotLoopTimer", "slotIndex", slotIndex, "slotType", slotType,
"totalTime", common.PrettyDuration(totalRunSlotLoopDur),
"totalWaitChanDur", common.PrettyDuration(totalWaitChanDur),
Expand All @@ -506,6 +507,8 @@ func (p *ParallelStateProcessor) runSlotLoop(slotIndex int, slotType int32) {
totalTryRunTxDur = 0
totalExecuteTxDur = 0
totalRunSlotLoopDur = 0
startTime = time.Now()
loopBeginTime = time.Now()
p.stopSlotChan <- struct{}{}
continue
case <-wakeupChan:
Expand Down
2 changes: 1 addition & 1 deletion core/state/parallel_statedb.go
Original file line number Diff line number Diff line change
Expand Up @@ -1348,7 +1348,7 @@ func (slotDB *ParallelStateDB) IsParallelReadsValid(isStage2 bool) bool {
if hasKvConflict(slotDB, unit.addr, unit.key, unit.val, isStage2) {
return false
}
}
}:wq
} else {
msgHandledNum := 0
msgSendNum := 0
Expand Down

0 comments on commit c0fc7cf

Please sign in to comment.