Bug 174416 - kst miss last 2 indexes for dirfiles
Summary: kst miss last 2 indexes for dirfiles
Status: RESOLVED FIXED
Alias: None
Product: kst
Classification: Applications
Component: general (show other bugs)
Version: 1.x
Platform: Fedora RPMs Linux
: NOR normal
Target Milestone: ---
Assignee: kst
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-11-06 11:06 UTC by karin dassas
Modified: 2008-11-13 02:05 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description karin dassas 2008-11-06 11:06:01 UTC
Version:           1.8.0_devel (using KDE 3.5.9)
OS:                Linux
Installed from:    Fedora RPMs

When opening an dirfile object with for instance 3 samples, kst only detect the first sample.
When there is only one or 2 samples, kst doesn't detect anything (and we can not open the group where the object is, we can not click on next using the data wizzard).

For instance
-rw-rw-r-- 1 qla4rt qla4rt 229 Nov  4 15:49 format
-rw-rw-r-- 1 qla4rt qla4rt  24 Nov  4 17:00 TIMESEC
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_V-tune
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_V-calc
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_V
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_T-tune
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_T
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_Step
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_Status
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_NS
-rw-rw-r-- 1 qla4rt qla4rt  12 Nov  4 17:00 HFI_00_OPT_I

HFI_00_OPT_V is a float. There are 3 samples.
(in format ; HFI_00_OPT_V RAW f 1)
With kst, we can see in the data manager
HFI_00_OPT_V Data Vector   1 /data1/qla4rt/rttest.hdmc/DATA/KST_html/Hs_HFI_00_OPT:Hs_HFI_00_OPT[0..-1]


Only 1 sample instead of 3


And we've got this for all dirfiles objects, whatever the number of samples, we always miss the last 2 samples.
Comment 1 D. V. Wiebe 2008-11-06 18:36:03 UTC
This was a "feature" added in the days of the Ur-getdata to make streaming dirfiles work with kst.  It currently lives in DirFileSource::update, where kst simply subtracts two from the number of frames that GetData reports.

Ideally it should be removed.  AFACT, kst should be able to work with a streamed dirfile (as long as appended to according to the Dirfile Standards) without it.  However Barth have a better idea of how much (if any) breaking of streaming dirfiles would result by removing the magic minus two.
Comment 2 Netterfield 2008-11-06 18:56:01 UTC
This makes real time data over an nfs mounted drive more reliable.

I agree that it may now be fine without it, as long as you mount with -o noac, but we would need to test that.

Perhaps if we detect if we are streaming (nf == old_nf).  If we are,
subtract the 2, if not, read to the end.

Comment 3 karin dassas 2008-11-10 15:09:37 UTC
We really need to get the last 2 samples, as we've got sometimes  some data with only one sample. We can't see the data at all with kst in that case.
Comment 4 Andrew Walker 2008-11-13 01:30:41 UTC
As the -2 seems at best to be a hack to work around a problem with streaming and is causing problems elsewhere I will remove it - unless there are any vocal complaints with good reasons not to do so.
Comment 5 Andrew Walker 2008-11-13 02:05:16 UTC
SVN commit 883489 by arwalker:

BUG:174416 remove hard-coded magic number of -2 to make all data within a dirfile dataset available

 M  +7 -4      dirfile.cpp  
 M  +3 -0      getdata.c  


WebSVN link: http://websvn.kde.org/?view=rev&revision=883489