Skip to content

Commit

Permalink
Adding more error logging for failed replication
Browse files Browse the repository at this point in the history
  • Loading branch information
maxpert committed Sep 12, 2022
1 parent f2b264a commit c59893f
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion db/changelog.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,7 +297,7 @@ func (conn *SqliteStreamDB) consumeChangeLogs(tableName string, changes []*chang
})

if err != nil {
logger.Error().Err(err).Msg("Change failed to notify on change")
logger.Error().Err(err).Msg("Failed to acquire consensus")
return err
}
}
Expand Down
1 change: 1 addition & 0 deletions lib/replica_machine.go
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ func (ssm *SQLiteStateMachine) Update(entries []sm.Entry) ([]sm.Entry, error) {
for _, entry := range entries {
event := &ReplicationEvent[db.ChangeLogEvent]{}
if err := event.Unmarshal(entry.Cmd); err != nil {
log.Error().Err(err).Msg("Unable to unmarshal command")
return nil, err
}

Expand Down

0 comments on commit c59893f

Please sign in to comment.