Qlik Community

Ask a Question

Knowledge

Search or browse our knowledge base to find answers to your questions ranging from account questions to troubleshooting error messages. The content is curated and updated by our global Support team

Announcements
Talk to Experts Tuesday: Live chat Aug. 24th 10 AM ET: Bring your Qlik Gold Client questions REGISTER TODAY

Concurrent Read and Write from/to a QVD file may result in one of the tasks failing

Sonja_Bauernfeind
Digital Support
Digital Support

Concurrent Read and Write from/to a QVD file may result in one of the tasks failing


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.

Environment:

 

Cause:

 

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.

 

Resolution:

Make sure that the Read and Write tasks are not scheduled at the same time.
If there's a risk of that occurring, it might be a good idea to run an external task that makes a copy of the qvd, before both tasks start, and use the copy as the source for the "read" task.

Version history
Revision #:
4 of 4
Last update:
‎2021-03-10 10:56 AM
Updated by:
 
Contributors