Skip to content

Commit 0d305cb

Browse files
authored
Do not get lock when saving snapshot (#461)
Do not get lock when saving snapshot and increase entries before snapshot
1 parent 7f38f86 commit 0d305cb

File tree

2 files changed

+1
-3
lines changed

2 files changed

+1
-3
lines changed

cluster/dragon/shard_odsm.go

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -328,8 +328,6 @@ func (s *ShardOnDiskStateMachine) PrepareSnapshot() (interface{}, error) {
328328
}
329329

330330
func (s *ShardOnDiskStateMachine) SaveSnapshot(i interface{}, writer io.Writer, _ <-chan struct{}) error {
331-
s.lock.Lock()
332-
defer s.lock.Unlock()
333331
log.Debugf("data shard %d saving snapshot", s.shardID)
334332
snapshot, ok := i.(*pebble.Snapshot)
335333
if !ok {

push/source/source.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,7 @@ func (s *Source) consumerError(err error, clientError bool) {
243243
return
244244
//panic("Got consumer error but souce is not started")
245245
}
246-
log.Errorf("Failure in consumer, source will be stopped: %+v. ", err)
246+
log.Errorf("Failure in consumer, source %s.%s will be stopped: %+v", s.sourceInfo.SchemaName, s.sourceInfo.Name, err)
247247
if err2 := s.stop(); err2 != nil {
248248
return
249249
}

0 commit comments

Comments
 (0)