app/vminsert: improve error message when the data cannot be sent to vmstorage - log reroutedBR buffer size

This should improve debuggability for improperly configured cluster
This commit is contained in:
Aliaksandr Valialkin 2020-08-31 17:51:40 +03:00
parent 6f9c1bc078
commit fe08b1eb26

View file

@ -509,8 +509,9 @@ func addToReroutedBufMayBlock(buf []byte, rows int) error {
for len(reroutedBR.buf)+len(buf) > reroutedBufMaxSize {
if getHealthyStorageNodesCount() == 0 {
rowsLostTotal.Add(rows)
return fmt.Errorf("all the vmstorage nodes are unavailable and reroutedBR has no enough space for storing %d bytes; only %d bytes left in reroutedBR",
len(buf), reroutedBufMaxSize-len(reroutedBR.buf))
return fmt.Errorf("all the vmstorage nodes are unavailable and reroutedBR has no enough space for storing %d bytes; "+
"only %d out of %d bytes left in reroutedBR",
len(buf), reroutedBufMaxSize-len(reroutedBR.buf), reroutedBufMaxSize)
}
select {
case <-rerouteWorkerStopCh: