Skip to content

Commit

Permalink
fix(storage): ArrayFilterCursor truncation for multi-block data (infl…
Browse files Browse the repository at this point in the history
…uxdata#19439)

Backport influxdata@abfe5a5

(cherry picked from commit 77d1a41)
  • Loading branch information
ethanyzhang authored and lesam committed Mar 12, 2021
1 parent 3eb4fda commit ab05d65
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions storage/reads/array_cursor.gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,8 +55,6 @@ func (c *floatArrayFilterCursor) Next() *cursors.FloatArray {

if c.tmp.Len() > 0 {
a = c.tmp
c.tmp.Timestamps = nil
c.tmp.Values = nil
} else {
a = c.FloatArrayCursor.Next()
}
Expand All @@ -76,6 +74,10 @@ LOOP:
}
}
}
// Clear buffered timestamps & values if we make it through a cursor.
// The break above will skip this if a cursor is partially read.
c.tmp.Timestamps = nil
c.tmp.Values = nil
a = c.FloatArrayCursor.Next()
}

Expand Down Expand Up @@ -284,8 +286,6 @@ func (c *integerArrayFilterCursor) Next() *cursors.IntegerArray {

if c.tmp.Len() > 0 {
a = c.tmp
c.tmp.Timestamps = nil
c.tmp.Values = nil
} else {
a = c.IntegerArrayCursor.Next()
}
Expand All @@ -305,6 +305,10 @@ LOOP:
}
}
}
// Clear buffered timestamps & values if we make it through a cursor.
// The break above will skip this if a cursor is partially read.
c.tmp.Timestamps = nil
c.tmp.Values = nil
a = c.IntegerArrayCursor.Next()
}

Expand Down Expand Up @@ -513,8 +517,6 @@ func (c *unsignedArrayFilterCursor) Next() *cursors.UnsignedArray {

if c.tmp.Len() > 0 {
a = c.tmp
c.tmp.Timestamps = nil
c.tmp.Values = nil
} else {
a = c.UnsignedArrayCursor.Next()
}
Expand All @@ -534,6 +536,10 @@ LOOP:
}
}
}
// Clear buffered timestamps & values if we make it through a cursor.
// The break above will skip this if a cursor is partially read.
c.tmp.Timestamps = nil
c.tmp.Values = nil
a = c.UnsignedArrayCursor.Next()
}

Expand Down Expand Up @@ -742,8 +748,6 @@ func (c *stringArrayFilterCursor) Next() *cursors.StringArray {

if c.tmp.Len() > 0 {
a = c.tmp
c.tmp.Timestamps = nil
c.tmp.Values = nil
} else {
a = c.StringArrayCursor.Next()
}
Expand All @@ -763,6 +767,10 @@ LOOP:
}
}
}
// Clear buffered timestamps & values if we make it through a cursor.
// The break above will skip this if a cursor is partially read.
c.tmp.Timestamps = nil
c.tmp.Values = nil
a = c.StringArrayCursor.Next()
}

Expand Down Expand Up @@ -931,8 +939,6 @@ func (c *booleanArrayFilterCursor) Next() *cursors.BooleanArray {

if c.tmp.Len() > 0 {
a = c.tmp
c.tmp.Timestamps = nil
c.tmp.Values = nil
} else {
a = c.BooleanArrayCursor.Next()
}
Expand All @@ -952,6 +958,10 @@ LOOP:
}
}
}
// Clear buffered timestamps & values if we make it through a cursor.
// The break above will skip this if a cursor is partially read.
c.tmp.Timestamps = nil
c.tmp.Values = nil
a = c.BooleanArrayCursor.Next()
}

Expand Down

0 comments on commit ab05d65

Please sign in to comment.