Fix: consider index of all files for data stream groups with multiple files
authorSimon Marchi <simon.marchi@efficios.com>
Wed, 16 Oct 2019 21:21:09 +0000 (17:21 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 30 Oct 2019 19:14:52 +0000 (15:14 -0400)
commit54dbe4d94562a938d07ec99930aa313d2fee6720
tree3253e6e206b69bde470cb84406412036e40fee64
parent7fbf4a2202c7b5c6cb509d4423ac8dc3a6c67c0d
Fix: consider index of all files for data stream groups with multiple files

The indexes associated to data stream file groups (dsfg) with multiple
files are incorrect.

The first time we process a file for a given dsfg, the group is created
using the index of that file.  Up to that point, it's fine.  When
processing the other files for that dsfg, the index is never used.  The
result is that the index for that dsfg only covers the time range of the
first file that was parsed, instead of the whole data stream.

Fix it by merging the index of the added file in
add_ds_file_to_ds_file_group, in the case where we add the file to an
existing group.

A test is added for this, in the form of a trace infos query.  The
implementation of this query uses the index data directly.

Change-Id: If1afd68be347210d1e258f8115b50547bc773760
Signed-off-by: Simon Marchi <simon.marchi@efficios.com>
Reviewed-on: https://review.lttng.org/c/babeltrace/+/2212
Reviewed-by: Francis Deslauriers <francis.deslauriers@efficios.com>
29 files changed:
src/plugins/ctf/fs-src/fs.c
src/plugins/ctf/fs-src/fs.h
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/README [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_0_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_1_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_2_2.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_3_0.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/index/mychan_3_1.idx [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/metadata [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_0_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_1_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_1 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_2_2 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_3_0 [new file with mode: 0644]
tests/data/ctf-traces/succeed/lttng-tracefile-rotation/kernel/mychan_3_1 [new file with mode: 0644]
tests/data/plugins/src.ctf.fs/succeed/trace-lttng-tracefile-rotation.expect [new file with mode: 0644]
tests/plugins/src.ctf.fs/query/test_query_trace_info.py
tests/plugins/src.ctf.fs/succeed/test_succeed
This page took 0.025889 seconds and 4 git commands to generate.