Menu

#2414 BufferDataSet append didn't account for offset into NIO buffer

nextrelease
open-fixed
nobody
None
5
2021-11-20
2021-11-19
No

Sadie noticed that the result of appending two trimmed CDF datasets was inconsistent (absurd, illogical). I studied this and a short code to demo is:

from org.das2.qds.buffer import BufferDataSet

def doTest( a1, a2 ):
    for a in append(a1[5:10],a2[0:5]):
        print a,
    print ''

a1= indgen(10)
a2= indgen(10)+10

doTest(a1,a2)

a1= BufferDataSet.copy( a1 )
a2= BufferDataSet.copy( a2 )

doTest(a1,a2)

The result of "doTest" should be the same in either case, but in Autoplot releases as far back as Jan 2020 the results are different.

Discussion

  • Jeremy Faden

    Jeremy Faden - 2021-11-19

    This problem was caused by an optimized BufferDataSet append, where the two NIO buffers are combined (which is a fast operation typically done in hardware) to produce the new result. However the code has never accounted for the non-zero offset into the NIO buffer caused by trim.

    The problem is fixed and is available in 20211119b or v2021a_11.

     
  • Jeremy Faden

    Jeremy Faden - 2021-11-19
    • status: open --> open-fixed
     
  • Jeremy Faden

    Jeremy Faden - 2021-11-20

    See https://sourceforge.net/p/autoplot/bugs/2409/ which is where BufferDataSet needed to handle timetags of different.

     
MongoDB Logo MongoDB