app/vminsert/netstorage: emit warnings instead of errors when re-routing data to healthy storage nodes

This commit is contained in:
Aliaksandr Valialkin 2020-05-27 16:31:41 +03:00
parent 75f2f3b09d
commit b4e3bffe4b

View File

@ -116,7 +116,7 @@ func (sn *storageNode) run(stopCh <-chan struct{}) {
if len(br.buf) == 0 { if len(br.buf) == 0 {
continue continue
} }
logger.Errorf("re-routing %d bytes with %d rows to other storage nodes because cannot dial storageNode %q: %s", logger.Warnf("re-routing %d bytes with %d rows to other storage nodes because cannot dial storageNode %q: %s",
len(br.buf), br.rows, sn.dialer.Addr(), err) len(br.buf), br.rows, sn.dialer.Addr(), err)
if addToReroutedBufNonblock(br.buf, br.rows) { if addToReroutedBufNonblock(br.buf, br.rows) {
sn.rowsReroutedFromHere.Add(br.rows) sn.rowsReroutedFromHere.Add(br.rows)
@ -135,7 +135,7 @@ func (sn *storageNode) run(stopCh <-chan struct{}) {
// Couldn't flush buf to sn. Mark sn as broken // Couldn't flush buf to sn. Mark sn as broken
// and try re-routing buf to healthy vmstorage nodes. // and try re-routing buf to healthy vmstorage nodes.
if err = bc.Close(); err != nil { if err = bc.Close(); err != nil {
logger.Errorf("cannot close connection to storageNode %q: %s", sn.dialer.Addr(), err) logger.Warnf("cannot close connection to storageNode %q: %s", sn.dialer.Addr(), err)
// continue executing the code below. // continue executing the code below.
} }
bc = nil bc = nil