-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Description
Describe the bug
A race condition exists in the CSV export functionality when multiple export operations are triggered simultaneously. When a service export is in progress and a glossary export is triggered at the same time, the websocket response handling causes column mismatches in the generated CSV files, where columns from one entity type (e.g., glossary terms) appear in another entity type's CSV (e.g., service CSV).
Root Cause:
The export system uses a shared state to track the currently active export job. When multiple exports are triggered concurrently, the second export overwrites the tracking information of the first one. This causes the system to mix up which data belongs to which export, resulting in CSV files with incorrect column structures.
Corrupted CSV exports with mismatched columns
Data integrity issues in exported files
Unreliable export functionality when users trigger multiple exports in quick succession
To Reproduce
- Setup:
- Log in to OpenMetadata instance (tested on beta environment)
- Ensure you have both a service (database/messaging/dashboard) and a glossary with data
Trigger concurrent exports:
- Open a service detail page (e.g., Database Service)
- Click export to CSV
- Immediately (while the first export is processing), navigate to a Glossary
- Click export to CSV on the glossary
Expected behavior:
- Service CSV should contain service-related columns (service name, type, connection details, etc.)
- Glossary CSV should contain glossary-related columns (term name, description, synonyms, etc.)
Actual behavior:
- One or both CSV files contain mismatched columns
- Example: Service CSV may contain glossary term columns like "synonyms", "relatedTerms"
Or glossary CSV may contain service-specific columns
Version:
- OS: [e.g. iOS]
- Python version:
- OpenMetadata version: [e.g. 0.8]
- OpenMetadata Ingestion package version: [e.g.
openmetadata-ingestion[docker]==XYZ]
Additional context
Add any other context about the problem here.