Bug 53806 - FileServer should provide thread-safe parsing
Summary: FileServer should provide thread-safe parsing
Alias: None
Product: JMeter - Now in Github
Classification: Unclassified
Component: Main (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
Depends on:
Blocks: 53807
  Show dependency tree
Reported: 2012-08-31 13:21 UTC by Sebb
Modified: 2012-09-17 19:52 UTC (History)
0 users


Note You need to log in before you can comment on or make changes to this bug.
Description Sebb 2012-08-31 13:21:15 UTC
At present, FileServer only provides access to read a single line.

This makes it difficult to enhance CSV DataSet to handle embedded new-lines.

It would be useful to provide access to the BufferedReader. This would not need to handle file restart, as it does not make sense for a single CSV record to be split across a file boundary.

See also Bug 53804.
Comment 1 Sebb 2012-08-31 16:27:25 UTC
Just realised that it won't work as orginally envisaged - there needs to be a lock to ensure that only a single thread can read multiple consecutive lines.

The functionality is still needed, but will need to be provided some other way, for example via a callback mechanism. Details TBA.
Comment 2 Sebb 2012-09-13 22:52:11 UTC
One way round this is to provide access to the reader, but require the caller to synchronise on the FileServer instance.

This is not ideal, as it means locking is not totally controlled by the FileServer class.
Comment 3 Sebb 2012-09-13 23:01:41 UTC
URL: http://svn.apache.org/viewvc?rev=1384590&view=rev
FileServer should provide direct access to the BufferedReader
Bugzilla Id: 53806

Comment 4 Sebb 2012-09-17 16:54:21 UTC
Rather than provide access to the buffered reader, it would be easier to control synchronisation if FileServer provided the data as a CSV parsed String array.
Comment 5 Sebb 2012-09-17 19:52:47 UTC
URL: http://svn.apache.org/viewvc?rev=1386736&view=rev
FileServer should provide thread-safe parsing
Bugzilla Id: 53806

Comment 6 The ASF infrastructure team 2022-09-24 20:37:51 UTC
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2908