You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 400194c
Browse filesBrowse the repository at this point in the historyBrowse files
[fix](ranger) Refuse after a load that fails past publication, and stop waiting for the load once the controller is closed
Two review findings on 6669fb6, the plugin that loads on its own thread.
RangerBasePlugin.init() installs the policy engine and starts its refresher
before it initializes the chained plugins, so a chained plugin that fails to
start throws out of the load with a live engine behind it - and the catch in
load() released the latch over it, logging that every check would be refused
while that engine went on answering with part of the configured authorization
missing. The catch now records the failure and stops what the load had
installed before the latch is released, and every answer refuses (null, which
each caller already reads as a refusal) while the plugin is in that state.
A controller closed while its check waited for the load - a catalog detached
during a load an unreachable admin holds up - sat out the plugin's REST
timeouts before the lifecycle fence refused it. awaitLoaded(BooleanSupplier)
gives up as soon as the caller says so, and the controller's three entry
points wait "unless closed": refused at once through the existing fence, read
lock and all, while the load goes on for whoever else holds the plugin.
Also: when the load ends with policies but no user store while groups are on,
a WARN names the consequence - requests carry no groups until one arrives -
rather than leaving it to the "user store version -1" in the load line.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Claude-Session: https://claude.ai/code/session_0191LreyBauJV7K7sZAbrB27
Copy file name to clipboardExpand all lines: fe/fe-authorization/fe-authorization-plugins/fe-authorization-plugin-ranger-common/src/main/java/org/apache/doris/catalog/authorizer/ranger/BackgroundLoadedRangerPlugin.java
Copy file name to clipboardExpand all lines: fe/fe-authorization/fe-authorization-plugins/fe-authorization-plugin-ranger-common/src/main/java/org/apache/doris/catalog/authorizer/ranger/RangerAccessController.java
+20-6Lines changed: 20 additions & 6 deletions
Original file line number
Diff line number
Diff line change
@@ -59,9 +59,11 @@
59
59
* read the table whole and in the clear.
60
60
*
61
61
* <p>A plugin still on its first load is neither: it is about to have an answer, and every question here
62
-
* waits for it ({@link BackgroundLoadedRangerPlugin#awaitLoaded()}) before anything else - before the
63
-
* lifecycle fence above all, so that a load the Ranger admin is slow to serve is waited for with no lock
64
-
* held, and closing this controller meanwhile is not queued behind it.
62
+
* waits for it ({@link BackgroundLoadedRangerPlugin#awaitLoaded(java.util.function.BooleanSupplier)})
63
+
* before anything else - before the lifecycle fence above all, so that a load the Ranger admin is slow to
64
+
* serve is waited for with no lock held, and closing this controller meanwhile is not queued behind it. Nor
65
+
* is the wait queued behind the close: a controller closed while its check waits stops waiting and refuses,
Copy file name to clipboardExpand all lines: fe/fe-authorization/fe-authorization-plugins/fe-authorization-plugin-ranger-doris/src/test/java/org/apache/doris/catalog/authorizer/ranger/BackgroundLoadedRangerPluginTest.java
0 commit comments