Caideyipi opened a new pull request, #18673:
URL: https://github.com/apache/iotdb/pull/18673
## Description
### Problem
`ProcedureManager.executeWithoutDuplicate` and `deleteDevices` waited for a
table procedure while still holding the `ProcedureManager` monitor. If a
duplicate request waited on a slow procedure, unrelated table operations could
not enter their duplicate-check and submission sections.
### Changes
- Keep duplicate detection and procedure submission inside the synchronized
section.
- Capture the procedure being waited on and release the monitor before
waiting for completion.
- Apply the same fix to `deleteDevices`.
- Add concurrent regression tests for duplicate create-table and
delete-devices requests. Each test verifies that an unrelated table procedure
can still be submitted while the duplicate request is waiting.
### Verification
- `mvn spotless:apply -pl iotdb-core/confignode`
- `mvn test -pl iotdb-core/confignode
"-Dtest=ProcedureManagerTest,ProcedureManagerTableTaskTest"`
- Tests run: 8, Failures: 0, Errors: 0, Skipped: 0
<hr>
This PR has:
- [x] been self-reviewed.
- [x] concurrent write
- [x] added unit tests to cover the new concurrent code paths.
<hr>
##### Key changed/added classes
- `ProcedureManager`
- `ProcedureManagerTableTaskTest`
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]