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

   ### What problem does this PR solve?
   
   Issue Number: close #xxx
   
   Related PR: #xxx
   
   Related Issue: #71417
   
   Problem Summary:
   Master FE invalidates `AuthenticationIntegrationRuntime` when executing 
`ALTER AUTHENTICATION INTEGRATION` (`markAuthenticationIntegrationDirty`) and 
`DROP AUTHENTICATION INTEGRATION` (`removeAuthenticationIntegration`), and 
`AuthenticationIntegrationRuntime.replayUpsertAuthenticationIntegration` 
already exists for Follower replay. However:
   1. `EditLog.loadJournal` (`OP_CREATE_AUTHENTICATION_INTEGRATION`, 
`OP_ALTER_AUTHENTICATION_INTEGRATION`, `OP_DROP_AUTHENTICATION_INTEGRATION`) 
only updates `AuthenticationIntegrationMgr` and never notifies 
`env.getAuthenticationIntegrationRuntime()`. As a result, Follower FEs continue 
serving stale cached authentication plugin instances/configuration after an 
`ALTER` (and leak removed plugin instances after a `DROP`) until restart.
   2. `Env.loadAuthenticationIntegrations` loads `AuthenticationIntegrationMgr` 
from an image without invoking 
`authenticationIntegrationRuntime.rebuildAuthenticationIntegrations(...)`.
   
   This PR updates `EditLog.loadJournal` (using the `env` parameter so 
checkpoint replay on `checkpointEnv` never mutates `servingEnv`) and 
`Env.loadAuthenticationIntegrations` to invalidate/rebuild the target `Env`'s 
`AuthenticationIntegrationRuntime`, and adds unit tests in 
`EditLogAuthenticationIntegrationReplayTest`.
   
   ### Release note
   
   None
   
   ### Check List (For Author)
   
   - Test
       - [ ] Regression test
       - [x] Unit Test
       - [ ] Manual test (add detailed scripts or steps below)
       - [ ] No need to test or manual test.
   
     Added `EditLogAuthenticationIntegrationReplayTest` covering 
`EditLog.loadJournal` (`CREATE`/`ALTER`/`DROP`) and 
`Env.loadAuthenticationIntegrations`. Relying on GitHub Actions CI for full FE 
build/UT/checkstyle execution (local macOS sparse checkout does not have 
`thirdparty` `thrift 0.24.0` installed).
   
   - Behavior changed:
       - [ ] No.
       - [x] Yes. Follower FEs now invalidate/evict cached 
`AuthenticationIntegrationRuntime` plugin instances on `EditLog` and image 
replay instead of serving stale configuration until restart.
   
   - Does this need documentation?
       - [x] No.
       - [ ] Yes.


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