Skip to content

Conversation

@RyanHolstien
Copy link
Collaborator

@RyanHolstien RyanHolstien commented Nov 15, 2025

Support read only deployment mode through configuration. Will drop writes to ES/OS, SQL, and Kafka.

@RyanHolstien RyanHolstien self-assigned this Nov 15, 2025
@github-actions github-actions bot added product PR or Issue related to the DataHub UI/UX devops PR or Issue related to DataHub backend & deployment labels Nov 15, 2025
@datahub-cyborg datahub-cyborg bot added the needs-review Label for PRs that need review from a maintainer. label Nov 15, 2025
@codecov
Copy link

codecov bot commented Nov 15, 2025

Codecov Report

❌ Patch coverage is 26.82927% with 30 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...din/gms/factory/entity/EntityAspectDaoFactory.java 0.00% 9 Missing ⚠️
...ctory/common/ElasticSearchGraphServiceFactory.java 0.00% 8 Missing ⚠️
...n/gms/factory/common/Neo4jGraphServiceFactory.java 0.00% 6 Missing ⚠️
...actory/kafka/DataHubKafkaEventProducerFactory.java 50.00% 2 Missing and 2 partials ⚠️
...ms/factory/search/ElasticSearchServiceFactory.java 60.00% 1 Missing and 1 partial ⚠️
.../gms/factory/telemetry/TrackingServiceFactory.java 0.00% 0 Missing and 1 partial ⚠️

❌ Your patch status has failed because the patch coverage (26.82%) is below the target coverage (75.00%). You can increase the patch coverage or adjust the target coverage.

📢 Thoughts on this report? Let us know!

@esteban
Copy link
Collaborator

esteban commented Nov 15, 2025

@RyanHolstien is there a follow up on on this to include some flag on the UI and the logs (probably at warn level) that read only mode is enabled? Since in this case write operations will be ignored completely it might be a bit risky to turn this on without some failure to clients in case an operator forgets to re-enable writes or uses the wrong endpoint (read-only) for writes.

@datahub-cyborg datahub-cyborg bot added pending-submitter-response Issue/request has been reviewed but requires a response from the submitter and removed needs-review Label for PRs that need review from a maintainer. labels Nov 15, 2025
@datahub-cyborg datahub-cyborg bot added pending-submitter-merge and removed pending-submitter-response Issue/request has been reviewed but requires a response from the submitter labels Nov 15, 2025
import com.linkedin.mxe.PlatformEvent;
import com.linkedin.mxe.TopicConvention;
import com.linkedin.mxe.TopicConventionImpl;
import io.datahubproject.metadata.context.OperationContext;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought there was another producer besides this one?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's the one for usage and platform events which should still be relevant even in read mode to capture when someone is making read calls. Unless we think read-only should not produce any analytics about its usage.

@RyanHolstien
Copy link
Collaborator Author

@RyanHolstien is there a follow up on on this to include some flag on the UI and the logs (probably at warn level) that read only mode is enabled? Since in this case write operations will be ignored completely it might be a bit risky to turn this on without some failure to clients in case an operator forgets to re-enable writes or uses the wrong endpoint (read-only) for writes.

Not at the moment, this should basically never be turned on except in very particular deployment scenarios. Not sure how it would work either since it's intentionally built around not throwing errors. You would get indications at the client layer though since it would be responding with an empty list of rows modified.

Copy link
Collaborator

esteban commented Nov 16, 2025

Can we just add a very obvious log line at least that will make obvious this is on? perhaps log at WARN level for every mutation? IIUC we are expecting on this mode not to see any write when this is enabled, right? so performance shouldn't be a concern when read only is enabled. Thanks!

@codecov
Copy link

codecov bot commented Nov 19, 2025

Bundle Report

Bundle size has no change ✅

@RyanHolstien RyanHolstien merged commit 0f3d3c1 into datahub-project:master Nov 20, 2025
80 of 85 checks passed
@RyanHolstien RyanHolstien deleted the feat/supportReadReplica branch November 20, 2025 01:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

devops PR or Issue related to DataHub backend & deployment pending-submitter-merge product PR or Issue related to the DataHub UI/UX

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants