Skip to content

Commit c8010a3

Browse files
add bytes returned to FETCH payload (#386)
1 parent d5699eb commit c8010a3

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

worker/shared/cmdprocessor.go

+3
Original file line numberDiff line numberDiff line change
@@ -660,6 +660,7 @@ outloop:
660660
for i := range writeCols {
661661
readCols[i] = &writeCols[i]
662662
}
663+
fetchBufferLen := 0
663664
for cp.rows.Next() {
664665
err = cp.rows.Scan(readCols...)
665666
if err != nil {
@@ -681,8 +682,10 @@ outloop:
681682
logger.GetLogger().Log(logger.Debug, "query result", outstr)
682683
} // causes high volume logs and can cause CI test issues */
683684
nss = append(nss, netstring.NewNetstringFrom(common.RcValue, []byte(outstr)))
685+
fetchBufferLen += len(outstr)
684686
}
685687
}
688+
calt.AddDataInt("psize", int64(fetchBufferLen))
686689
if len(nss) > 0 {
687690
resns := netstring.NewNetstringEmbedded(nss)
688691
err = WriteAll(cp.SocketOut, resns)

0 commit comments

Comments
 (0)