zmuxuny opened a new pull request, #7153:
URL: https://github.com/apache/rocketmq-dashboard/pull/7153

   ### Which Issue(s) This PR Fixes
   
   - Fixes #7152
   
   ### Brief Description
   
   Keep concurrent admissions on the existing unique-turn collision path. 
Select the candidate turn before checking whether the conversation is busy.
   
   Previously, request A could read "idle", request B admit turn 1, and A then 
select turn 2. Both inserts succeeded because their turn values differed. Two 
active runs then owned independent sinks for the same conversation's timeline.
   
   With the read order corrected, an admission either sees the already-active 
run or keeps the same candidate turn as the racing request, where the existing 
`(conversation_id, turn)` unique key produces the existing 409 response. No new 
lock, schema, API, transaction or dependency is added. Concurrent conversation 
deletion remains separate work (#6953).
   
   ### How Did You Test This Change?
   
   - A deterministic service regression controls query interleavings, snapshots 
the delayed empty active lookup, models the existing unique key, and defers 
both workers. It fails on baseline with two QUEUED rows (turns 1 and 2).
   - A second control interleaves admission after both requests have selected 
the same turn, preserving the existing unique-key-to-409 behavior.
   - Tests exercise real admission, event sinks and registry with 
repository/executor boundaries controlled. No live MySQL/provider concurrency 
test is claimed.
   
   Final verification (Java21, cached dependencies, one fork):
   
   ```sh
   mvn -o -B -ntp -f server/pom.xml \
     
-Dtest=AiRunServiceTest,AiRunExecutorTest,AgentRunRegistryTest,AiEventSeqAllocationTest,AiEventJsonSerializationTest,AiEventContractTest,AgentEventProjectorTest,AgentStreamSessionTest,AgentRunHandleStopTest
 test
   # 9 suites,408 tests,0 failures/errors/skips; Checkstyle0 violations
   
   git diff --check
   # passed
   ```
   
   The local JVM configuration used the existing Mockito javaagent, Maven 
heap384MiB and test heap256MiB. Independent read-order and regression review 
passed.
   
   ### Checklist
   
   - [x] One coherent change, Conventional Commits subject
   - [x] Regression tests named `...Test`, existing ASF headers retained
   - [x] Existing single-active-run contract preserved without public 
API/schema changes
   - [x] No UI text or new dependency
   - [ ] Full database-backed backend suite not run locally; focused suites are 
reported above
   
   Base branch: `rocketmq-studio`.
   


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