Feature Better configuration management#25652
Conversation
|
TypeScript types have been updated based on the JSON schema changes in the PR |
|
| if (searchRepository == null) { | ||
| synchronized (Entity.class) { |
There was a problem hiding this comment.
⚠️ Bug: Race condition in lazy initialization of searchRepository
The getSearchRepository() method implements lazy initialization with a check-then-act pattern that has two issues:
-
Missing double-check inside synchronized block: After thread A checks
searchRepository == nullbut before it acquires the lock, thread B might initialize it. Thread A then enters the synchronized block and creates a second instance, wasting resources and potentially causing issues with any state inSearchRepository. -
Non-volatile static field: Even with proper double-checked locking, without
volatileon thesearchRepositoryfield, there's a risk of another thread seeing a partially constructed object due to Java's memory model.
Impact: In a multi-threaded server environment (which OpenMetadata is), multiple threads calling getSearchRepository() during startup could result in multiple SearchRepository instances being created, or worse, one thread using a partially initialized instance.
Suggested fix:
- Add
volatileto thesearchRepositoryfield declaration - Add a second null check inside the synchronized block after acquiring the lock
Was this helpful? React with 👍 / 👎
🔍 CI failure analysis for ac6b5ad: Multiple CI failures: Backend integration tests failed during bootstrap (RELATED to PR). maven-postgresql-ci and maven-sonarcloud-ci both had 211 test failures (cascade). Python tests failed with Pydantic errors (RELATED). UI and Playwright had unrelated failures.IssueMultiple CI jobs failed across backend integration tests, Python integration tests, frontend UI coverage tests, and Playwright E2E tests. Root Cause - Backend Integration Tests (RELATED TO PR)During migration v1.10.2, Stack trace: Backend test suite failures (all cascade from same root cause):
These 211 failures in each suite are cascade effects from the same bootstrap initialization issue. Migration fails, leaving system inconsistent. Root Cause - Python Integration Tests (RELATED TO PR)2 Python integration tests failed with Pydantic validation errors on both Python 3.10 and 3.11:
Test results: 2 failed, 531 passed, 21 skipped, 2 errors Error: Assessment: Backend returns Root Cause - UI Coverage Tests (UNRELATED)6 UI tests failed with MUI Root Cause - Playwright E2E Tests (UNRELATED)6 total failures across 2 shards - typical E2E flakiness. DetailsImpact:
Code Review
|
| Auto-apply | Compact |
|
|
Was this helpful? React with 👍 / 👎 | Gitar



Adding a configSource property to OpenMetadata settings that lets operators control where
configuration is read from:
updates)
Problem solved: Previously, settings stored in the database on first startup would ignore
subsequent ENV/YAML changes, confusing operators who expected config file changes to take effect.
Scope: