RANGER-5423: Bulk policy evaluation holds read lock for entire batch,…#770
RANGER-5423: Bulk policy evaluation holds read lock for entire batch,…#770vyommani wants to merge 1 commit intoapache:masterfrom
Conversation
… causing writer starvation and delayed policy updates
Below is the output of the benchmark that I had run, blease find below the results.=== BULK EVALUATION PERFORMANCE BENCHMARK ===Configuration:
|
|
Summary – Apache Ranger Bulk‑Policy Evaluation Improvement What we changed Benchmark environment Key results Scenario Throughput (r/s) @ 1 k batch. Throughput (r/s) @ 10 k batch. Memory. P95 Latency Lock‑free Snapshot (delta = false). ~3.76 M ~3.59 M 33‑42 MB 9‑88 ms Legacy Locked (delta = true) ~3.57 M ~3.43 M ~33 MB 10‑91 ms |
Bulk policy evaluation holds read lock for entire batch, causing writer starvation and delayed policy updates
What changes were proposed in this pull request?
When delta sync is disabled (deltaEnabled=false), policy evaluations now use a lock-free snapshot instead of holding locks during the evaluation loop. The existing locked path remains unchanged when delta sync is enabled.
How was this patch tested?
mvn clean install is clean and I ran a benchmark test which shows positive improvements.