[bug] Data node editor id mechanism solve #2065
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
this PR is under #2017
This project implements a locking mechanism for data nodes in a Taipy-based application. It ensures that data nodes cannot be written to or appended to if they are currently being edited by another process. The repository includes:
Enhanced DataNode and FileDataNode classes with lock checks for write(), append(), and _upload() methods. Custom exception handling via DataNodeIsBeingEdited. Unit tests to ensure full code coverage for the locking functionality.
Modified DataNode class: Added locking mechanism to write(), append(), and _upload() methods.
New FileDataNode class: Added lock check to _upload() method.
Test Cases:
test_write_locked_data_node(): Verifies the write() method respects the lock.
test_append_locked_data_node(): Verifies append() method respects the lock.
test_append_non_list_data(): Ensures append() only works on list data.
test_file_data_node_upload_locked(): Verifies _upload() respects the lock.