|Summary:||FileServer should provide thread-safe parsing|
|Component:||Main||Assignee:||JMeter issues mailing list <issues>|
|Bug Depends on:|
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 Log: FileServer should provide direct access to the BufferedReader Bugzilla Id: 53806 Modified: jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java jmeter/trunk/xdocs/changes.xml
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 Log: FileServer should provide thread-safe parsing Bugzilla Id: 53806 Modified: jmeter/trunk/src/components/org/apache/jmeter/config/CSVDataSet.java jmeter/trunk/src/core/org/apache/jmeter/services/FileServer.java jmeter/trunk/xdocs/changes.xml