[ZEPPELIN-6394] Fix concurrent file write issue when saving interpreter settings #5144
All Vouch review confidence checks passed
Residual risk 0.15 = Change Risk (0.37) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.37 · 230 lines diff across 2 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.326
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #5144"
general
weight: 0.35
Reamer
What is this PR for?
Fix concurrent case throws java.nio.file.NoSuchFileException
https://github.com/apache/zeppelin/blob/8251dc4e013cde02879d186240155da8f996bdb7/zeppelin-zengine/src/main/java/org/apache/zeppelin/interpreter/InterpreterSetting.java#L1011-L1015
<img width="1959" height="956" alt="3a885fb1-f192-4693-94d1-a7eef140d030" src="https://github.com/user-attachments/assets/f01d7ef0-2b84-4ad9-ba28-67ea011c135c" />
Problem
When multiple interpreters download dependencies simultaneously during startup or other cases, the saveToFile() method can be called concurrently by multiple threads. This happens because loadInterpreterDependencies() spawns asynchronous threads that call saveToFile() when dependency download completes.
Solution
Add synchronized keyword to InterpreterSettingManager.saveToFile() method to ensure thread-safe file operations. This prevents multiple threads from writing to the configuration file simultaneously.
Impact
What type of PR is it?
Bug Fix
Todos
[ ] - Task
What is the Jira issue?
https://issues.apache.org/jira/browse/ZEPPELIN-6394
How should this be tested?
Strongly recommended: add automated unit tests for any new or changed behavior
Outline any manual steps to test the PR here.
Screenshots (if appropriate)
Questions:
Does the license files need to update?
Is there breaking changes for older versions?
Does this needs documentation?