dataroaring opened a new pull request, #62064:
URL: https://github.com/apache/doris/pull/62064

   ## Summary
   
   - `removeDatabase()` uses a manual `index` counter during iteration, then 
calls `openedDatabases.remove(index)` after the loop
   - If `getDatabaseName()` throws (e.g. `DatabasePreemptedException` for a 
preempted database), the index counter gets out of sync with actual position, 
causing removal of the wrong database handle
   - Fix: replace manual index tracking with `iterator.remove()`, which is both 
correct and concise
   
   ## Test plan
   - [ ] Verify old journal databases are correctly removed during cleanup
   - [ ] Verify no wrong database handles are removed from `openedDatabases`
   
   🤖 Generated with [Claude Code](https://claude.com/claude-code)


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


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to