TenKeyAngle / dataturbine

Automatically exported from code.google.com/p/dataturbine
1 stars 0 forks source link

Fetch doesn't work as expected #22

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Start a RBNB server
2. Start a RBNB source generator and configure it to produce 50 channels of 
floating point data at the default rates
3. Create a sink that downloads the data using fetch(0) as the argument for all 
10 channels

What is the expected output? What do you see instead?
The expectation is that if there is no data to be obtained, or only some of the 
data is available, then an empty map, or map with a fetch timed out flag will 
be returned.
What is observed instead is partial data is often returned, often times several 
channels will be missing for the same timestamp. If the data is being output 
directly to a file this can cause gaps in the CSV columns where data is 
expected.

What version of the product are you using? On what operating system?
Latest version (3.2) on Windows.

Please provide any additional information below.
The only other option available to me to prevent this from happening is to call 
fetch(-1).  This doesn't work when communicating to remote locations with flaky 
internet connections because the sink client gets stuck in this fetch(-1) call 
and doesn't seem to quit in a timely fashion.

Another issue that might be related to this is it would be very nice to be able 
to call from another thread and abort a fetch(-1).  It seems that internally 
RBNB uses a BufferedInput to receive the data from the RBNB server.  This 
BufferedInput doesn't respond correctly to a Thread.interrupt() call and this 
makes it so the Sink.fetch(-1) call can never abort even when interrupt() is 
called on the thread using the fetch(-1).  A description of a possible solution 
is included in the answers shown to this question:
http://stackoverflow.com/questions/3595926/how-to-interrupt-bufferedreaders-read
line

Original issue reported on code.google.com by RyanLind...@gmail.com on 25 Apr 2013 at 8:28