Concurrent Read and Write from/to a QVD file may result in one of the tasks failing
Article Number: 000003391 | Last Modified: 2018/06/12
There are tasks configured that both read from as well as write to the same QVD file at approximately the same time. Intermittently one of the tasks may result in a failure due to the file being opened exclusively by the write task or a read task already having the file open and the write not being able to get an exclusive open.
This has been reviewed by R&D and the resultant behavior is to be expected. When the write task reaches the point of execution of the Store statement, it will attempt to open the file exclusively thus denying other tasks both read and write access to the file.
Scenario 1: Read/Read - Task 1 (Read) opens the QVD file then Task 2 (Read) opens the file while Task 1 still has it open. All tasks run fine.
Scenario 2: Write/Read - Task 1 (Write) opens the QVD file then Task 2 (Read) also opens the file while Task 1 still has it open. Task 2 will fail since Task 1 has the file opened exclusively and Task 1 will run fine.
Scenario 3: Read/Write - Task 1 (Read) opens the QVD file then Task 2 (Write) also opens the file while Task 1 still has it open. Task 2 will fail since it will not be allowed to open the file exclusively while there are other tasks reading from it. Task 1 completes fine, Task 2 results in a failure.