Caideyipi opened a new pull request, #17902:
URL: https://github.com/apache/iotdb/pull/17902

   ## Description
   
   ### Prevent duplicate procedure execution
   - Add a per-procedure execution guard so a duplicated scheduler entry cannot 
run the same Procedure instance concurrently.
   - Release the guard, active executor count, and worker state in the worker 
finally path.
   - Release locks when a scheduled procedure is no longer RUNNABLE.
   
   ### Avoid duplicate lock wakeups
   - De-duplicate LockQueue waiters by procedure id before adding a waiting 
procedure.
   - Keep PipeTaskCoordinatorLock waiting until a permit is actually acquired, 
even if the thread is already interrupted.
   
   ### Tests
   - Add coverage for duplicate procedure scheduling, duplicate LockQueue 
wakeups, interrupted PipeTaskCoordinatorLock acquisition, and completed 
PipeHandleLeaderChangeProcedure equality.
   
   <hr>
   
   This PR has:
   - [x] been self-reviewed.
       - [x] concurrent read
       - [x] concurrent write
       - [x] concurrent read and write
   - [x] added unit tests or modified existing tests to cover new code paths, 
ensuring the threshold for code coverage.
   
   <hr>
   
   ##### Key changed/added classes (or packages if there are too many classes) 
in this PR
   - org.apache.iotdb.confignode.procedure.Procedure
   - org.apache.iotdb.confignode.procedure.ProcedureExecutor
   - org.apache.iotdb.confignode.procedure.scheduler.LockQueue
   - 
org.apache.iotdb.confignode.manager.pipe.coordinator.task.PipeTaskCoordinatorLock
   
   ##### Local verification
   - PASS: mvn -pl iotdb-core/confignode spotless:apply
   - FAIL: mvn -pl iotdb-core/confignode 
-Dtest=TestLockRegime,TestProcedureExecutor,PipeHandleLeaderChangeProcedureTest,PipeTaskCoordinatorLockTest
 test failed during compile before test execution because local 
generated/snapshot dependencies were missing classes such as 
TGetCommitProgressReq, TPullCommitProgressReq, CommitProgressKeeper, and 
RegionProgress.


-- 
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]

Reply via email to