Skip to content

Commit 5b354d6

Browse files
Georges Berengermeta-codesync[bot]
authored andcommitted
Make sure the stream ID reported when reading records using a mulitireader is the virtual stream ID
Summary: MultiRecordFileReader must use virtualized Stream IDs, to guarantee that stream IDs are unique, even when files read together have streams with identical stream IDs. This change ensures that when reading records through MultiRecordFileReader, we use the virtual stream ID, not the file level stream ID. Reviewed By: liorda Differential Revision: D85787188 fbshipit-source-id: b1606f5268bcac33c9c802b79a955fa306809d0e
1 parent 2cf1262 commit 5b354d6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

csrc/reader/MultiVRSReader.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -666,6 +666,8 @@ py::object OssMultiVRSReader::readNextRecordInternal() {
666666
}
667667

668668
auto r = PyRecord(record, nextRecordIndex_, lastRecord_);
669+
// the stream ID in record is the file's stream ID, not the unique stream ID
670+
r.streamId = reader_.getUniqueStreamId(&record).getNumericName();
669671
nextRecordIndex_++;
670672
return py::cast(r);
671673
}

0 commit comments

Comments
 (0)