flux-framework / dyad

DYAD: DYnamic and Asynchronous Data Streamliner
GNU Lesser General Public License v3.0
6 stars 5 forks source link

Prod lock fix #102

Closed JaeseungYeom closed 5 months ago

JaeseungYeom commented 5 months ago

A producer would lock a file at open to avoid the file being read by a consumer who has access to the same storage before it completes writing. This was added an optimization to bypass KVS-based synchronization. However, there was no check to see if the file was under the managed directory. As a result, network-related device files were locked possibly resulting in performance degradation or errors. Unfortunately, this PR does not fix all the current issues. The C API interfacing with Python API dyad_get_metadata(file) returns DYAD_RC_UNTRACKED when the file is not under a managed path. On the other hand, C interface returns DYAD_RC_OK so that open()/fopen() can proceed as usual if the file is not supposed to be managed. This is might be worth looking into it as we have unidentified Python API bug.

This PR is based on PR #100 PR #88 would need a similar treatment.